mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 03:24:40 -07:00
Avoid lock to server with client lock held
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -1129,8 +1129,7 @@ func (c *client) unsubscribe(sub *subscription) {
|
||||
// tries to deliver us a message. Remote queue subscribers are directed
|
||||
// so we need to know what to do to avoid unnecessary message drops
|
||||
// from [auto-]unsubscribe.
|
||||
if c.typ == CLIENT && c.srv != nil &&
|
||||
len(sub.queue) > 0 && c.srv.NumRoutes() > 0 {
|
||||
if c.typ == CLIENT && c.srv != nil && len(sub.queue) > 0 {
|
||||
c.srv.holdRemoteQSub(sub)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user