Skip to content

fix(client): release SSE reader locks#1998

Open
Genmin wants to merge 2 commits intomodelcontextprotocol:v1.xfrom
Genmin:fix/sse-reader-release-lock
Open

fix(client): release SSE reader locks#1998
Genmin wants to merge 2 commits intomodelcontextprotocol:v1.xfrom
Genmin:fix/sse-reader-release-lock

Conversation

@Genmin
Copy link
Copy Markdown

@Genmin Genmin commented Apr 30, 2026

Summary

  • release the parsed SSE stream reader in a finally block after _handleSseStream exits or throws
  • keep the existing outer error path intact so disconnect handling and reconnection scheduling still run after cleanup
  • add regressions for both graceful EOF and read-error cleanup

Fixes #1959.

Validation

  • npm test -- test/client/streamableHttp.test.ts
  • npm run typecheck
  • npm run lint
  • npm test

@Genmin Genmin requested a review from a team as a code owner April 30, 2026 17:02
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 30, 2026

🦋 Changeset detected

Latest commit: f74d19a

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 30, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@modelcontextprotocol/sdk@1998

commit: f74d19a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant