#128

Server is crashing if the client aborts the request before response is sent

Openutkarsh-dixitopened 11mo ago

Issue

Server is crashing if the client aborts the request before a complete response with mcp-server-handler is sent, with the following stack trace:

Unhandled rejection

Error: aborted
    at abortIncoming (node:_http_server:809:17)
    at socketOnClose (node:_http_server:803:3)
    at Socket.emit (node:events:530:35)
    at Socket.emit (node:domain:489:12)
    at TCP.<anonymous> (node:net:351:12)
    at TCP.callbackTrampoline (node:internal/async_hooks:130:17)

Expected Result

mcp-handler should handle socket close gracefully and not crash the server

Version info

Node:  v22.14.0
mcp-handler: 1.0.2
NextJs: 15.2.1 

Activity

0

No activity yet.