feat(client): add reconnectionScheduler to StreamableHTTPClientTransport #1763
Claude / Claude Code Review
completed
Mar 27, 2026 in 5m 5s
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/client/src/client/streamableHttp.ts:354-358 |
Stale _cancelReconnection when scheduler returns void |
Annotations
Check warning on line 358 in packages/client/src/client/streamableHttp.ts
claude / Claude Code Review
Stale _cancelReconnection when scheduler returns void
Nit: When the custom `reconnectionScheduler` returns `void` (no cancel function), `_cancelReconnection` is not reset to `undefined`, so it can retain a stale cancel function from a prior `_scheduleReconnection` call. The `setTimeout` path (line 360) always sets `_cancelReconnection`, but the scheduler path only sets it conditionally. Fix: `this._cancelReconnection = typeof cancel === "function" ? cancel : undefined;`
Loading