FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: clean up session when disconnected by nightosong · Pull Request #2044 · modelcontextprotocol/python-sdk · GitHub

fix: clean up session when disconnected - #2044

Closed
nightosong wants to merge 2 commits into
modelcontextprotocol:mainfrom
nightosong:fix/sse
Closed

fix: clean up session when disconnected#2044
nightosong wants to merge 2 commits into
modelcontextprotocol:mainfrom
nightosong:fix/sse

Conversation

Copy link
Copy Markdown

Motivation and Context

Changes:

  • Remove session_id from _read_stream_writers when the SSE connection is closed.
  • Ensure proper cleanup after EventSourceResponse returns.

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

maxisbey commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Closing in favour of #2200 which has the same fix plus a regression test. Thanks for the contribution @nightosong — the diagnosis was correct.

AI Disclaimer

maxisbey closed this Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL