fix(core): consolidate per-request cleanup in _requestWithSchema (#1790)

This commit is contained in:
Felix Weinberger 2026-03-30 22:46:14 +01:00 • committed by GitHub
commit 89fb0947b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,5 @@
---
'@modelcontextprotocol/core': patch
---
Consolidate per-request cleanup in `_requestWithSchema` into a single `.finally()` block. This fixes an abort signal listener leak (listeners accumulated when a caller reused one `AbortSignal` across requests) and two cases where `_responseHandlers` entries leaked on send-failure paths.