fix: handle EPIPE errors in StdioServerTransport to prevent process crash (#1568)
Co-authored-by: User <user@example.com> Co-authored-by: Felix Weinberger <fweinberger@anthropic.com> Co-authored-by: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com>
This commit is contained in:
parent
462c3fc47d
commit
f1ade75b67
1 changed files with 124 additions and 3 deletions
5
.changeset/fix-stdio-epipe-crash.md
Normal file
5
.changeset/fix-stdio-epipe-crash.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'@modelcontextprotocol/server': patch
|
||||
---
|
||||
|
||||
Handle stdout errors (e.g. EPIPE) in `StdioServerTransport` gracefully instead of crashing. When the client disconnects abruptly, the transport now catches the stdout error, surfaces it via `onerror`, and closes.
|
||||
Loading…
Reference in a new issue