return error from UnregisterName wrappers

This commit is contained in:
ionutboangiu
2026-02-17 17:29:03 +02:00
committed by Dan Christian Bogos
parent 19ac633e1a
commit ac97165f81
4 changed files with 7 additions and 7 deletions

View File

@@ -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,

View File

@@ -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 {

View File

@@ -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

View File

@@ -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