Protocol._oncancel guards with a falsy check (protocol.ts:337):
if (\!notification.params.requestId) {
return;
}
so a notifications/cancelled carrying requestId: 0 is treated like an absent id and the in-flight handler keeps running. Id 0 is a legal JSON-RPC request id — it's the id this SDK's own client assigns to initialize, since the per-instance counter is zero-based.
Fix is requestId \!== undefined (or \!= null) instead of truthiness.
Protocol._oncancelguards with a falsy check (protocol.ts:337):so a
notifications/cancelledcarryingrequestId: 0is treated like an absent id and the in-flight handler keeps running. Id 0 is a legal JSON-RPC request id — it's the id this SDK's own client assigns toinitialize, since the per-instance counter is zero-based.Fix is
requestId \!== undefined(or\!= null) instead of truthiness.