-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
bugSomething isn't workingSomething isn't workingneeds confirmationNeeds confirmation that the PR is actually required or needed.Needs confirmation that the PR is actually required or needed.
Description
Describe the bug
While reviewing the source code, I noticed that the close method is never actually called, which means res.end is never triggered:
https://github.com/modelcontextprotocol/typescript-sdk/blob/main/src/server/sse.ts
In multiple places, it seems like onclose is called directly when close should be used instead, to ensure proper cleanup.
To Reproduce
I created a minimal reproduction here:
https://github.com/nichtsam/transport-issue
Steps to reproduce the behavior:
npm run startnpx @modelcontextprotocol/inspector- connect to
http://localhost:3001/sse - disconnect
Expected behavior
res.end should be called via the close method to cleanly terminate the SSE connection.
TranquilMarmot
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneeds confirmationNeeds confirmation that the PR is actually required or needed.Needs confirmation that the PR is actually required or needed.