Keep a hold's release behind MessageHold, and require its listener count
Test / lint (pull_request) Successful in 23s
Test / test (18) (pull_request) Successful in 31s
Test / test (20) (pull_request) Successful in 31s
Test / test (22) (pull_request) Successful in 31s
Test / test (24) (pull_request) Successful in 31s
Test / test (26) (pull_request) Successful in 32s
Mirror / push (push) Successful in 5s

This commit was merged in pull request #35.
This commit is contained in:
2026-09-28 01:03:15 +02:00
parent 9dda1a6917
commit 0b9b210fb2
2 changed files with 21 additions and 18 deletions
+1 -2
View File
@@ -324,12 +324,11 @@ export class IncomingRequests {
bindAllows: cmdName => this.deps.bindAllows(cmdName),
lostLink: () => this.linkGeneration !== generation,
onAnswered: () => { hold.answered(); },
// Past the refusal only while a drain is still waiting for this message; an ordinary send after.
send: input => (hold.isHeld() ? this.deps.sendPastDrain(input) : this.deps.send(input)),
});
this.holds.set(sms, hold);
if (!this.deps.offerSms(sms)) hold.untaken();
if (!this.deps.offerSms(sms)) hold.release();
}
}