Skip to content

Commit

Permalink
append to subscribers (#2640)
Browse files Browse the repository at this point in the history
* append to subscribers

* Update rpc_router.go

error correction log
  • Loading branch information
farums authored Nov 26, 2023
1 parent 674b982 commit ca6190f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/rpc_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ func (s *rpcServer) reSubscribe(config Options) error {
}

s.subscribers[sb] = []broker.Subscriber{sub}
s.router.Subscribe(sb)
}

return nil
Expand Down
1 change: 1 addition & 0 deletions server/rpc_router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit ca6190f

Please sign in to comment.