valkey: close the socket on every fail() and mark the client disconnected before onclose runs - #37993
Closed
alii wants to merge 27 commits into
Closed
valkey: close the socket on every fail() and mark the client disconnected before onclose runs#37993alii wants to merge 27 commits into
alii wants to merge 27 commits into
Claude / Claude Code Review
completed
Aug 13, 2026 in 43m 31s
Code review found 1 potential issue
Found 1 candidates, confirmed 1. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/runtime/valkey_jsc/valkey.rs:610 |
reconnect() sync-connect() failure leaves connect() promise unsettled — sibling site of the PR's fix |
Annotations
Check warning on line 610 in src/runtime/valkey_jsc/valkey.rs
claude / Claude Code Review
reconnect() sync-connect() failure leaves connect() promise unsettled — sibling site of the PR's fix
`reconnect()`'s synchronous-`connect()`-failure branch calls **`JSValkeyClient::fail_with_js_value`** (only fires the user's `onclose`), not the `ValkeyClient::fail_with_js_value` this PR fixed — so a `redis+unix://` path that vanishes between connections (or fd exhaustion) leaves `is_reconnecting` set, offline-queued commands unrejected, and the cached `connect()` promise unsettled; a `connect()` from that `onclose` returns the same hung promise. Same class as the three sites this PR fixes, so
Loading