mcp: allow asynchronous cancel notification (#1151)

Fixes #1150
This commit is contained in:
Guglielmo Colombo 2026-08-07 10:43:17 +02:00 • committed by GitHub
commit 039119057f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -34,6 +34,16 @@ Options listed below were added and will be removed in the 1.9.0 version of the
existing renegotiation logic recover and prevents the failure from tearing
down the underlying connection.
- `blockingcancelnotify` added. If set to `1`, a cancelled call waits
synchronously for the best-effort `notifications/cancelled` message to be
delivered (up to `notifyCancellationTimeout`, currently 5 s) before
returning to the caller, restoring the previous behavior. The delivery
error is joined into the caller's returned error. The default behavior was
changed so that the call is retired immediately and the notification is
sent asynchronously off the caller's return path: the caller returns as
soon as its context is cancelled and cannot be delayed by a slow or
unresponsive peer. See issue #1150.
### 1.7.0
Options listed below were added and will be removed in the 1.9.0 version of the SDK.