Skip to content

Conversation

@shellRaining
Copy link

Added logic to clean up residual listeners after calling transport.close().

This is my third attempt to submit a PR to the repository. I hope anybody can pay some attention to review it, I'd be truly grateful. and also point out any mistakes if there are any.

Motivation and Context

see #780

How Has This Been Tested?

After making this modification, residual listeners will not be triggered after closing the transport, and only "close" will be printed in the console.

and past all test suits

Breaking Changes

No 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

@shellRaining shellRaining requested a review from a team as a code owner December 11, 2025 11:01
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 11, 2025

Open in StackBlitz

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

commit: be57196

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