Commit 743a887
committed
fix: inject progressToken when resetTimeoutOnProgress is set
Previously, _meta.progressToken was only injected into the outgoing
JSON-RPC request when options.onprogress was provided. Setting
resetTimeoutOnProgress: true alone had no effect because the SDK's
_onprogress handler matches incoming notifications by
params.progressToken → messageId — without a token in the request,
server progress notifications can never be matched, and _resetTimeout
is never called.
This change expands the injection condition to also fire when
resetTimeoutOnProgress is true, making the flag behave as its name
implies: if you want the timeout to reset on progress, the server must
be able to send progress notifications that match the request.
The onprogress handler registration is unchanged — a no-op progressToken
injection when only resetTimeoutOnProgress is set does not register a
progress handler (avoiding unnecessary memory use).
Fixes: #2451 parent 7ba58da commit 743a887
1 file changed
Lines changed: 4 additions & 2 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
832 | 832 | | |
833 | 833 | | |
834 | 834 | | |
835 | | - | |
836 | | - | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
837 | 839 | | |
838 | 840 | | |
839 | 841 | | |
| |||
0 commit comments