Split a retried drop out of close, and range-check the backoff
`close` fires only where nothing will bring the session back; a drop the reconnect loop will retry is `disconnected`, pairing with `reconnected`. `minDelay: 0` never doubles, so the backoff never started — both delays are range-checked now, and only `false` spells reconnect off.
This commit is contained in:
@@ -1408,7 +1408,11 @@ describe('application hooks that throw or reject', () => {
|
||||
describe('link timers', () => {
|
||||
test('closes a client link the peer has stopped answering', async t => {
|
||||
const peer = await bindOnlyPeer(t);
|
||||
const { err, session } = await client({ enquireLinkInterval: 50, port: peer.port });
|
||||
const { err, session } = await client({
|
||||
enquireLinkInterval: 50,
|
||||
port: peer.port,
|
||||
reconnect: false,
|
||||
});
|
||||
|
||||
assert.equal(err, undefined);
|
||||
assert.ok(session);
|
||||
|
||||
Reference in New Issue
Block a user