Retry the first connect and bind on reconnect fromStart (#80)

* Regression tests for a client that retries its first connect and bind

* Retry the first connect and bind on reconnect: { fromStart: true }

* Pin that the signal bounding the first bind also closes the session

* Name a failed connect once, default the backoff where it lives, and fix the deadline advice

* Carry the failure that started the retries on the abort that ends them

* Pin one retry announcement per attempt when a link drops mid-bind

* Announce a retry when its wait is over, not when it is scheduled

* Say what the process-hold assertion expects, not what a failure would mean
This commit is contained in:
2026-09-05 22:47:06 +02:00
committed by GitHub
parent 45d2f5548e
commit afe188eecd
8 changed files with 467 additions and 56 deletions
+2 -2
View File
@@ -265,8 +265,8 @@ export class Session extends EventEmitter<SessionEvents> {
return new ReconnectLoop({
connect: reconnect.connect,
log: this.log,
maxDelay: reconnect.maxDelay ?? defaults.maxDelay,
minDelay: reconnect.minDelay ?? defaults.minDelay,
maxDelay: reconnect.maxDelay,
minDelay: reconnect.minDelay,
onConnected: sock => this.comeBackUp(sock, reconnect.onConnected),
});
}