Skip to content

Conversation

@mattzcarey
Copy link
Contributor

in SSE and streamable-http
just a bunch more places where this isnt done properly.

Motivation and Context

How Has This Been Tested?

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@mattzcarey mattzcarey requested a review from a team as a code owner December 2, 2025 12:34
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 2, 2025

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/sdk@1214

commit: 50e30a1

@KKonstantinov
Copy link
Contributor

LGTM

@KKonstantinov KKonstantinov merged commit 0a374fc into main Dec 4, 2025
10 checks passed
@KKonstantinov KKonstantinov deleted the fix-cancel-unused-requests branch December 4, 2025 09:56
grimmerk added a commit to grimmerk/typescript-sdk that referenced this pull request Dec 19, 2025
body.cancel() can hang indefinitely with certain server responses
(e.g., Sentry MCP's OAuth flow). Using text?.().catch(() => {}) is safer:
- Always completes (reads all data)
- Releases connection (body consumed)
- No stream coordination needed
- Uses optional chaining for compatibility with mock responses

Fixes regression from modelcontextprotocol#1173 and modelcontextprotocol#1214.
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.

3 participants