From 92f8e8aed7fe1c6e15da49c0bcbdd37a63fd2186 Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Tue, 17 Feb 2026 20:20:34 +0200 Subject: [PATCH] check BiGobListen when (un)registering birpc methods --- services/sessions.go | 4 ++-- services/thresholds.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/sessions.go b/services/sessions.go index a8ffc1c1e..85ea7adad 100644 --- a/services/sessions.go +++ b/services/sessions.go @@ -109,7 +109,7 @@ func (smg *SessionService) Start() error { smg.server.RpcRegister(legacySrv) } // Register BiRpc handlers - if smg.cfg.ListenCfg().BiJSONListen != "" { + if smg.cfg.ListenCfg().BiJSONListen != "" || smg.cfg.ListenCfg().BiGobListen != "" { smg.server.BiRPCRegisterName(utils.SessionSv1, srv) } return nil @@ -129,7 +129,7 @@ func (smg *SessionService) Shutdown() (err error) { if err = smg.sm.Shutdown(); err != nil { return err } - if smg.cfg.ListenCfg().BiJSONListen != "" { + if smg.cfg.ListenCfg().BiJSONListen != "" || smg.cfg.ListenCfg().BiGobListen != "" { _ = smg.server.BiRPCUnregisterName(utils.SessionSv1) } smg.sm = nil diff --git a/services/thresholds.go b/services/thresholds.go index 1500a8028..348b52156 100644 --- a/services/thresholds.go +++ b/services/thresholds.go @@ -97,7 +97,7 @@ func (thrs *ThresholdService) Start() error { } thrs.connChan <- thrs.anz.GetInternalCodec(srv, utils.ThresholdS) // Register BiRpc handlers - if thrs.cfg.ListenCfg().BiJSONListen != "" { + if thrs.cfg.ListenCfg().BiJSONListen != "" || thrs.cfg.ListenCfg().BiGobListen != "" { thrs.server.BiRPCRegisterName(utils.ThresholdSv1, srv) } return nil @@ -117,7 +117,7 @@ func (thrs *ThresholdService) Shutdown() (err error) { thrs.Lock() defer thrs.Unlock() thrs.thrs.Shutdown() - if thrs.cfg.ListenCfg().BiJSONListen != "" { + if thrs.cfg.ListenCfg().BiJSONListen != "" || thrs.cfg.ListenCfg().BiGobListen != "" { _ = thrs.server.BiRPCUnregisterName(utils.ThresholdSv1) } thrs.thrs = nil