Skip to content

Merge branch 'main' into fweinberger/reconnection-scheduler

3ac7bb4
Select commit
Loading
Failed to load commit list.
Merged

feat(client): add reconnectionScheduler to StreamableHTTPClientTransport #1763

Merge branch 'main' into fweinberger/reconnection-scheduler
3ac7bb4
Select commit
Loading
Failed to load commit list.
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

See this annotation in the file changed.

@claude 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;`