Fix timeout reset upon progress notification - #2817
lowlyocean wants to merge 1 commit into
Conversation
|
@modelcontextprotocol/client
@modelcontextprotocol/codemod
@modelcontextprotocol/core
@modelcontextprotocol/server
@modelcontextprotocol/server-legacy
@modelcontextprotocol/express
@modelcontextprotocol/fastify
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
koriyoshi2041
left a comment
There was a problem hiding this comment.
The startTime reset here changes maxTotalTimeout from an absolute request lifetime cap into another inactivity window. That is why all 12 protocol:timeout:max-total E2E variants time out in Node 20/22/24: recurring progress can now postpone the maximum indefinitely. The inactivity timer already resets via clearTimeout + setTimeout; startTime needs to remain the original request timestamp. Please remove the info.startTime = Date.now() assignment and keep/add a regression where progress extends the ordinary timeout but the request still rejects at the original maxTotalTimeout deadline.
Motivation and Context
Closes #2816
How Has This Been Tested?
Ran the full test suite
Breaking Changes
No breaking changes
Types of changes
Checklist
Additional context
This fixes MCP inspector v2, which claims to automatically reset request timeout when progress notifications are received