Skip to content

tls: close a destroyed TLS socket with a bare FIN, no close_notify - #40412

Merged
Jarred-Sumner merged 6 commits into
mainfrom
farm/9b664294/tls-destroy-bare-fin
Sep 1, 2026
Merged

Jarred-Sumner merged 6 commits into
mainfrom
farm/9b664294/tls-destroy-bare-fin

tls: close a destroyed TLS socket with a bare FIN, no close_notify

44756b9
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 25, 2026 in 5m 42s

Code review found 1 potential issue

Found 5 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit test/regression/issue/40401.test.ts:65-70 Test server cleanup runs after assertions, leaks on failure

Annotations

Check warning on line 70 in test/regression/issue/40401.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Test server cleanup runs after assertions, leaks on failure

Server cleanup (`proxy.close()`/`target.close()`) runs after the assertions at lines 58 and 66, so on the pre-fix build — where `teardownBytes` is nonzero — the test throws before either server is closed. Wrap the body in `try { ... } finally { proxy.close(); target.close(); }` so cleanup runs on failure too, per REVIEW.md's "release every resource … registered BEFORE the assertions" rule.