Release a message's hold when the response goes out, or when its listener failed

This commit is contained in:
2026-09-02 08:15:26 +02:00
parent 6cb186d38a
commit 3aadb64df8
7 changed files with 65 additions and 19 deletions
+5 -1
View File
@@ -351,7 +351,11 @@ Grouped by what each one constrains.
drain waits for. Counting every inbound request until `sendReturn()` answered it was rejected —
an `onRequest` that deliberately answers nothing would then cost a full `shutdownTimeout` on every
close — and a message no listener took is released at once, since nothing is going to answer it.
`teardown()` drops what is still held for the same reason it drops inbound segments. The release
A listener that threw or rejected before answering releases it the same way, for the same reason,
with `sessionError` carrying the failure. What ends the wait is the response reaching the wire, not
the call: a `sendResp()` the library refused leaves the message held, so `close()` still reports the
one the peer is owed. `teardown()` drops what is still held for the same reason it drops inbound
segments. The release
is one turn late, so a listener that sends its receipt straight after the response is still
holding when the drain looks; `sendDlr()` is the one send that goes out past the drain's refusal,
and only while the message is still held — past that it is an ordinary send, because the drain it