usockets: wait for the TLS spill at the HTTP close gates; drain a large https response after peer FIN - #35109
Merged
Merged
Claude / Claude Code Review
completed
Jul 22, 2026 in 12m 41s
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 | packages/bun-uws/src/HttpContext.h:212-214 |
Stale comments: getBufferedAmount() does not count the TLS spill; hasFullyDrained() does |
Annotations
Check warning on line 214 in packages/bun-uws/src/HttpContext.h
claude / Claude Code Review
Stale comments: getBufferedAmount() does not count the TLS spill; hasFullyDrained() does
Two comments still describe the earlier approach where `getBufferedAmount()` itself counted the TLS spill: the `onOpen<IsNodeHttp>` comment at `packages/bun-uws/src/HttpContext.h:212` ("getBufferedAmount() counts the TLS spill, so onEnd's defer and onWritable's close gate are accurate for both transports") and the doc comment above `us_internal_ssl_spill_pending()` at `packages/bun-usockets/src/crypto/openssl.c:2117` ("uWS's getBufferedAmount() adds this …"). After commit fe40534e, `getBufferedA
Loading