Repository navigation
usockets: stop deriving eof from kqueue EV_EOF - #32257
Open
Jarred-Sumner wants to merge 7 commits into
Open
Jarred-Sumner wants to merge 7 commits into
Jarred-Sumner wants to merge 7 commits into
Claude / Claude Code Review
completed
Jun 15, 2026 in 29m 6s
Code review found 1 important issue
Found 4 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 1 |
| 🟡 Nit | 0 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🔴 Important | packages/bun-usockets/src/socket.c:662-667 |
us_socket_pause SSL-aware shut-down check mismatches raw-poll-type dispatch gate |
Annotations
Check failure on line 667 in packages/bun-usockets/src/socket.c
claude / Claude Code Review
us_socket_pause SSL-aware shut-down check mismatches raw-poll-type dispatch gate
The arm-side and consume-side of the new `watched==0` sentinel use mismatched definitions of "shut down" for SSL sockets. `us_socket_pause()` tests the SSL-aware `us_socket_is_shut_down(s)` (true once `SSL_SENT_SHUTDOWN` is set, even though `us_internal_ssl_shutdown` does **not** call `raw_shutdown` when `SSL_shutdown()` returns ≥0, so the poll type stays `POLL_TYPE_SOCKET`), but the dispatch gate at epoll_kqueue.c:316-317 requires the raw `us_internal_poll_type(poll) == POLL_TYPE_SOCKET_SHUT_DO
Loading