mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 03:24:40 -07:00
Merge pull request #1424 from nats-io/fix_1421
[FIXED] Possible removal of interest on queue subs with leaf nodes
This commit is contained in:
@@ -3975,6 +3975,7 @@ func (c *client) teardownConn() {
|
||||
// Update route as normal for a normal subscriber.
|
||||
if sub.queue == nil {
|
||||
srv.updateRouteSubscriptionMap(acc, sub, -1)
|
||||
srv.updateLeafNodes(acc, sub, -1)
|
||||
} else {
|
||||
// We handle queue subscribers special in case we
|
||||
// have a bunch we can just send one update to the
|
||||
@@ -3989,8 +3990,6 @@ func (c *client) teardownConn() {
|
||||
if srv.gateway.enabled {
|
||||
srv.gatewayUpdateSubInterest(acc.Name, sub, -1)
|
||||
}
|
||||
// Now check on leafnode updates.
|
||||
srv.updateLeafNodes(acc, sub, -1)
|
||||
}
|
||||
// Process any qsubs here.
|
||||
for _, esub := range qsubs {
|
||||
|
||||
@@ -1395,7 +1395,7 @@ func TestConnectErrorReports(t *testing.T) {
|
||||
defer s.Shutdown()
|
||||
|
||||
// Wait long enough for the number of recurring attempts to happen
|
||||
time.Sleep(10 * routeConnectDelay)
|
||||
time.Sleep(50 * routeConnectDelay)
|
||||
s.Shutdown()
|
||||
|
||||
content, err := ioutil.ReadFile(log)
|
||||
@@ -1444,7 +1444,7 @@ func TestConnectErrorReports(t *testing.T) {
|
||||
defer s.Shutdown()
|
||||
|
||||
// Wait long enough for the number of recurring attempts to happen
|
||||
time.Sleep(10 * opts.LeafNode.ReconnectInterval)
|
||||
time.Sleep(50 * opts.LeafNode.ReconnectInterval)
|
||||
s.Shutdown()
|
||||
|
||||
content, err = ioutil.ReadFile(log)
|
||||
@@ -1494,7 +1494,7 @@ func TestConnectErrorReports(t *testing.T) {
|
||||
defer s.Shutdown()
|
||||
|
||||
// Wait long enough for the number of recurring attempts to happen
|
||||
time.Sleep(10 * gatewayConnectDelay)
|
||||
time.Sleep(50 * gatewayConnectDelay)
|
||||
s.Shutdown()
|
||||
|
||||
content, err = ioutil.ReadFile(log)
|
||||
@@ -1569,7 +1569,7 @@ func TestReconnectErrorReports(t *testing.T) {
|
||||
cs.Shutdown()
|
||||
|
||||
// Wait long enough for the number of recurring attempts to happen
|
||||
time.Sleep(DEFAULT_ROUTE_RECONNECT + 15*routeConnectDelay)
|
||||
time.Sleep(DEFAULT_ROUTE_RECONNECT + 50*routeConnectDelay)
|
||||
s.Shutdown()
|
||||
|
||||
content, err := ioutil.ReadFile(log)
|
||||
@@ -1636,7 +1636,7 @@ func TestReconnectErrorReports(t *testing.T) {
|
||||
cs.Shutdown()
|
||||
|
||||
// Wait long enough for the number of recurring attempts to happen
|
||||
time.Sleep(opts.LeafNode.ReconnectInterval + 15*opts.LeafNode.ReconnectInterval)
|
||||
time.Sleep(50 * opts.LeafNode.ReconnectInterval)
|
||||
s.Shutdown()
|
||||
|
||||
content, err = ioutil.ReadFile(log)
|
||||
@@ -1699,7 +1699,7 @@ func TestReconnectErrorReports(t *testing.T) {
|
||||
cs.Shutdown()
|
||||
|
||||
// Wait long enough for the number of recurring attempts to happen
|
||||
time.Sleep(2*gatewayReconnectDelay + 15*gatewayConnectDelay)
|
||||
time.Sleep(50 * gatewayConnectDelay)
|
||||
s.Shutdown()
|
||||
|
||||
content, err = ioutil.ReadFile(log)
|
||||
|
||||
Reference in New Issue
Block a user