removing cncReqs global variables

This commit is contained in:
gezimbll
2024-03-28 07:35:27 -04:00
committed by Dan Christian Bogos
parent 05e6e2660c
commit 699989a336
2 changed files with 2 additions and 12 deletions

View File

@@ -434,16 +434,9 @@ func main() {
lgLevel = *logLevel
}
utils.Logger.SetLogLevel(lgLevel)
// init the concurrentRequests
cncReqsLimit := cfg.CoreSCfg().Caps
if utils.ConcurrentReqsLimit != 0 { // used as shared variable
cncReqsLimit = utils.ConcurrentReqsLimit
}
cncReqsStrategy := cfg.CoreSCfg().CapsStrategy
if len(utils.ConcurrentReqsStrategy) != 0 {
cncReqsStrategy = utils.ConcurrentReqsStrategy
}
caps := engine.NewCaps(cncReqsLimit, cncReqsStrategy)
caps := engine.NewCaps(cfg.CoreSCfg().Caps, cfg.CoreSCfg().CapsStrategy)
utils.Logger.Info(fmt.Sprintf("<CoreS> starting version <%s><%s>", vers, goVers))
// init the channel here because we need to pass them to connManager

View File

@@ -148,9 +148,6 @@ var (
// ProtectedSFlds are the fields that sessions should not alter
ProtectedSFlds = NewStringSet([]string{CGRID, OriginHost, OriginID, Usage})
ConcurrentReqsLimit int
ConcurrentReqsStrategy string
)
const (