Commit7c13688aRecorded4 Aug 2026Repositorysigil-tls
Release notes: cover the non-blocking tls-write change and the fd leak
Changed
RELEASE_NOTES_v0.16.5.md | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)Diff
RELEASE_NOTES_v0.16.5.mdmodified
@@ -28,10 +28,25 @@ two new procedures report why a connection attempt failed.
28
and then went silent; `"handshake-failed"` means the peer refused us. Those 29
are different facts and callers retry them differently, which a single `#f` 30
cannot express.−31
- Fixed a file descriptor leak on the `tls-upgrade` failure path. The socket−32
object is marked closed before the handshake runs, so nothing else owned−33
that descriptor. It was hard to reach before; a bounded handshake makes−34
timeouts an ordinary outcome and the leak reachable.+31
- `tls-write` on a non-blocking connection returns the bytes it actually+32
committed, possibly zero, instead of spinning. It previously retried+33
`WANT_WRITE` in a hot loop that never returned and never yielded, so a peer+34
that stopped reading could pin a CPU indefinitely and no caller could bound+35
a write at all. Blocking connections are unchanged. `tls-write` also gains+36
optional start and end byte offsets, mirroring `socket-write`, so a write+37
loop resending the tail of a large body stays O(n) rather than O(n squared).+38
+39
## Fixed+40
+41
- A file descriptor leak on the `tls-upgrade` failure path. The socket object+42
is marked closed before the handshake runs, so nothing else owned that+43
descriptor and nothing would ever close it.+44
+45
This one matters more than its size suggests. The leak was hard to reach+46
while handshake failures were rare, and bounding the handshake makes+47
timeouts an ordinary outcome. Shipping the bound without this would have+48
traded a hang for descriptor exhaustion weeks later, by which time the+49
connection between the two would have been invisible. 50
51
## Upgrade notes 52