mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 16:48:45 +05:00
Adding initial stopChan to the engine
This commit is contained in:
@@ -59,7 +59,9 @@ func runCGREngine(fs []string) (err error) {
|
||||
if cfg, err = services.InitConfigFromPath(ctx, *flags.CfgPath, *flags.NodeID, *flags.LogLevel); err != nil || *flags.CheckConfig {
|
||||
return
|
||||
}
|
||||
cgr := services.NewCGREngine(cfg, servmanager.NewServiceIndexer(), []servmanager.Service{})
|
||||
|
||||
stopChan := make(chan struct{})
|
||||
cgr := services.NewCGREngine(stopChan, cfg, servmanager.NewServiceIndexer(), []servmanager.Service{})
|
||||
defer cgr.Stop(*flags.PidFile)
|
||||
|
||||
if err = cgr.Run(ctx, cancel, flags, vers,
|
||||
@@ -73,6 +75,7 @@ func runCGREngine(fs []string) (err error) {
|
||||
}
|
||||
|
||||
<-ctx.Done()
|
||||
//<-stopChan
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user