fix(server): replay request SSE responses after closeSSEStream#2152
Open
fallintoplace wants to merge 2 commits into
Open
fix(server): replay request SSE responses after closeSSEStream#2152fallintoplace wants to merge 2 commits into
fallintoplace wants to merge 2 commits into
Conversation
|
@modelcontextprotocol/client
@modelcontextprotocol/codemod
@modelcontextprotocol/server
@modelcontextprotocol/express
@modelcontextprotocol/fastify
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
closeSSEStream()detaches the live controllerRoot cause
closeSSEStream()intentionally removes the active response stream so a long-running request can continue while the client reconnects. The request-scopedsend()path still treated the live controller as a prerequisite for storing replay events, so a terminal response produced during that reconnect window could not be replayed and instead failed withNo connection established for request ID.Validation
npx -y pnpm@10.26.1 --filter @modelcontextprotocol/server test -- test/server/streamableHttp.test.tsnpx -y pnpm@10.26.1 --filter @modelcontextprotocol/node test -- test/streamableHttp.test.tsnpx -y pnpm@10.26.1 --filter @modelcontextprotocol/server typechecknpx -y pnpm@10.26.1 --filter @modelcontextprotocol/node typechecknpx -y pnpm@10.26.1 --filter @modelcontextprotocol/server lintnpx -y pnpm@10.26.1 --filter @modelcontextprotocol/node lintASDF_NODEJS_VERSION=24.15.0 git push -u origin fix-close-sse-request-replay(repo pre-push hook: build, typecheck, lint)Fixes #2151