mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-20 06:38:45 +05:00
return error from UnregisterName wrappers
This commit is contained in:
committed by
Dan Christian Bogos
parent
19ac633e1a
commit
ac97165f81
@@ -85,8 +85,8 @@ func (s *Server) RpcRegisterName(name string, rcvr any) {
|
||||
s.Unlock()
|
||||
}
|
||||
|
||||
func (s *Server) RpcUnregisterName(name string) {
|
||||
s.rpcSrv.UnregisterName(name)
|
||||
func (s *Server) RpcUnregisterName(name string) error {
|
||||
return s.rpcSrv.UnregisterName(name)
|
||||
}
|
||||
|
||||
func (s *Server) RegisterHttpFunc(pattern string, handler func(http.ResponseWriter, *http.Request)) {
|
||||
@@ -118,8 +118,8 @@ func (s *Server) BiRPCRegisterName(name string, rcvr any) {
|
||||
s.birpcSrv.RegisterName(name, rcvr)
|
||||
}
|
||||
|
||||
func (s *Server) BiRPCUnregisterName(name string) {
|
||||
s.birpcSrv.UnregisterName(name)
|
||||
func (s *Server) BiRPCUnregisterName(name string) error {
|
||||
return s.birpcSrv.UnregisterName(name)
|
||||
}
|
||||
|
||||
func (s *Server) serveCodec(addr, codecName string, newCodec func(conn conn, caps *engine.Caps, anz *analyzers.AnalyzerService) birpc.ServerCodec,
|
||||
|
||||
@@ -88,7 +88,7 @@ func (dspS *DispatcherService) Start() error {
|
||||
|
||||
dspS.dspS = dispatchers.NewDispatcherService(datadb, dspS.cfg, fltrS, dspS.connMgr)
|
||||
|
||||
dspS.server.RpcUnregisterName(utils.AttributeSv1)
|
||||
_ = dspS.server.RpcUnregisterName(utils.AttributeSv1)
|
||||
|
||||
srv, err := newDispatcherServiceMap(dspS.dspS)
|
||||
if err != nil {
|
||||
|
||||
@@ -130,7 +130,7 @@ func (smg *SessionService) Shutdown() (err error) {
|
||||
return err
|
||||
}
|
||||
if smg.cfg.ListenCfg().BiJSONListen != "" {
|
||||
smg.server.BiRPCUnregisterName(utils.SessionSv1)
|
||||
_ = smg.server.BiRPCUnregisterName(utils.SessionSv1)
|
||||
}
|
||||
smg.sm = nil
|
||||
<-smg.connChan
|
||||
|
||||
@@ -118,7 +118,7 @@ func (thrs *ThresholdService) Shutdown() (err error) {
|
||||
defer thrs.Unlock()
|
||||
thrs.thrs.Shutdown()
|
||||
if thrs.cfg.ListenCfg().BiJSONListen != "" {
|
||||
thrs.server.BiRPCUnregisterName(utils.ThresholdSv1)
|
||||
_ = thrs.server.BiRPCUnregisterName(utils.ThresholdSv1)
|
||||
}
|
||||
thrs.thrs = nil
|
||||
<-thrs.connChan
|
||||
|
||||
Reference in New Issue
Block a user