mirror of
https://github.com/tendermint/tendermint.git
synced 2026-04-15 21:27:06 +00:00
pubsub: check for termination in UnsubscribeAll (#7820)
This check was correctly handled in Unsubscribe, but not UnsubscribeAll.
This commit is contained in:
@@ -281,6 +281,9 @@ func (s *Server) UnsubscribeAll(ctx context.Context, clientID string) error {
|
||||
s.subs.Lock()
|
||||
defer s.subs.Unlock()
|
||||
|
||||
if s.subs.index == nil {
|
||||
return ErrServerStopped
|
||||
}
|
||||
evict := s.subs.index.findClientID(clientID)
|
||||
if len(evict) == 0 {
|
||||
return ErrSubscriptionNotFound
|
||||
|
||||
Reference in New Issue
Block a user