Name the loop's own flag, and drop droppedWhileDraining()
Mirror / push (push) Successful in 6s
Test / lint (pull_request) Successful in 27s
Test / test (18) (pull_request) Successful in 32s
Test / test (20) (pull_request) Successful in 31s
Test / test (22) (pull_request) Successful in 32s
Test / test (24) (pull_request) Successful in 32s
Test / test (26) (pull_request) Successful in 32s

This commit is contained in:
2026-09-28 21:27:00 +02:00
parent cce1d7c02e
commit 2152b995d4
4 changed files with 8 additions and 10 deletions
+2 -1
View File
@@ -333,7 +333,8 @@ export class Session extends EventEmitter<SessionEvents> {
const messages = await this.incoming.drain(this.answering(timeout), signal);
const requests = await this.outgoing.drain(leftOf(deadline), signal);
if (this.outgoing.droppedWhileDraining()) {
// The link went before the drain finished, so an empty window says nothing about the peer.
if (!this.outgoing.canCarry()) {
return { err: new Error('The session closed before the drain finished') };
}