From ca6190f5f289e01b0792f678b3b52dbc07f691e3 Mon Sep 17 00:00:00 2001 From: Elmut <50531748+farums@users.noreply.github.com> Date: Sun, 26 Nov 2023 12:08:28 +0200 Subject: [PATCH] append to subscribers (#2640) * append to subscribers * Update rpc_router.go error correction log --- server/rpc_events.go | 1 + server/rpc_router.go | 1 + 2 files changed, 2 insertions(+) diff --git a/server/rpc_events.go b/server/rpc_events.go index b4ae6ce4d9..b2d3df1612 100644 --- a/server/rpc_events.go +++ b/server/rpc_events.go @@ -137,6 +137,7 @@ func (s *rpcServer) reSubscribe(config Options) error { } s.subscribers[sb] = []broker.Subscriber{sub} + s.router.Subscribe(sb) } return nil diff --git a/server/rpc_router.go b/server/rpc_router.go index 1788db7646..dcb99a9b31 100644 --- a/server/rpc_router.go +++ b/server/rpc_router.go @@ -549,6 +549,7 @@ func (router *router) ProcessMessage(ctx context.Context, msg Message) (err erro subs, ok := router.subscribers[msg.Topic()] router.su.RUnlock() if !ok { + log.Warnf("Subscriber not found for topic %s", msg.Topic()) return nil }