Skip to content

notifications/cancelled is ignored for request id 0 #2283

@felixweinberger

Description

@felixweinberger

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesv2-fixesKnown v2 bugs to fix before stable

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions