mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
[Fixed] remote subscription leak for leafnodes caused by auto unsubscribe
Signed-off-by: Matthias Hanel <mh@synadia.com>
This commit is contained in:
committed by
Matthias Hanel
parent
edee54b005
commit
b154c3d957
@@ -2976,6 +2976,7 @@ func (c *client) deliverMsg(sub *subscription, subject, reply, mh, msg []byte, g
|
||||
defer srv.gatewayUpdateSubInterest(client.acc.Name, sub, -1)
|
||||
}
|
||||
defer srv.updateRouteSubscriptionMap(client.acc, sub, -1)
|
||||
defer srv.updateLeafNodes(client.acc, sub, -1)
|
||||
}
|
||||
defer client.unsubscribe(client.acc, sub, true, true)
|
||||
} else if sub.nm > sub.max {
|
||||
@@ -2987,6 +2988,7 @@ func (c *client) deliverMsg(sub *subscription, subject, reply, mh, msg []byte, g
|
||||
if srv.gateway.enabled {
|
||||
srv.gatewayUpdateSubInterest(client.acc.Name, sub, -1)
|
||||
}
|
||||
srv.updateLeafNodes(client.acc, sub, -1)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user