mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-15 10:40:41 -07:00
Only send if we deleted properly
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -1672,13 +1672,17 @@ func (s *Server) debugSubscribers(sub *subscription, c *client, subject, reply s
|
||||
case <-time.After(500 * time.Millisecond):
|
||||
}
|
||||
// Cleanup the WC entry.
|
||||
var sendResponse bool
|
||||
s.mu.Lock()
|
||||
if s.sys != nil && s.sys.replies != nil {
|
||||
delete(s.sys.replies, replySubj)
|
||||
sendResponse = true
|
||||
}
|
||||
s.mu.Unlock()
|
||||
// Send the response.
|
||||
s.sendInternalAccountMsg(nil, reply, atomic.LoadInt32(&nsubs))
|
||||
if sendResponse {
|
||||
// Send the response.
|
||||
s.sendInternalAccountMsg(nil, reply, atomic.LoadInt32(&nsubs))
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user