mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
remove unnecessary indirection in semaphore
This commit is contained in:
parent
549d06bc98
commit
5b33cd436f
7 changed files with 39 additions and 40 deletions
|
|
@ -612,11 +612,11 @@ func (server *Server) applyConfig(config *Config) (err error) {
|
|||
if initial {
|
||||
maxIPConc := int(config.Server.IPCheckScript.MaxConcurrency)
|
||||
if maxIPConc != 0 {
|
||||
server.semaphores.IPCheckScript.Initialize(maxIPConc)
|
||||
server.semaphores.IPCheckScript = utils.NewSemaphore(maxIPConc)
|
||||
}
|
||||
maxAuthConc := int(config.Accounts.AuthScript.MaxConcurrency)
|
||||
if maxAuthConc != 0 {
|
||||
server.semaphores.AuthScript.Initialize(maxAuthConc)
|
||||
server.semaphores.AuthScript = utils.NewSemaphore(maxAuthConc)
|
||||
}
|
||||
|
||||
if err := overrideServicePrefixes(config.Server.OverrideServicesHostname); err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue