mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-23 08:08:45 +05:00
stop birpc listeners on engine shutdown
make goroutine wait on shdChan and call StopBiRPC to close the listener(s). Connection goroutines still leak (they need to be fixed on birpc library side).
This commit is contained in:
committed by
Dan Christian Bogos
parent
7983a319db
commit
19ac633e1a
@@ -264,6 +264,10 @@ func startBiRPC(smg *SessionService, tS *ThresholdService, server *cores.Server,
|
||||
}
|
||||
},
|
||||
}
|
||||
go func() {
|
||||
<-shdChan.Done()
|
||||
server.StopBiRPC()
|
||||
}()
|
||||
if err := server.ServeBiRPC(cfg.ListenCfg().BiJSONListen, cfg.ListenCfg().BiGobListen, onConns, onDiss); err != nil {
|
||||
utils.Logger.Err(fmt.Sprintf("<%s> serve BiRPC error: %s!", utils.SessionS, err))
|
||||
shdChan.CloseOnce()
|
||||
|
||||
Reference in New Issue
Block a user