We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ac7bb4 commit 6e24e54Copy full SHA for 6e24e54
packages/client/src/client/streamableHttp.ts
@@ -353,9 +353,7 @@ export class StreamableHTTPClientTransport implements Transport {
353
354
if (this._reconnectionScheduler) {
355
const cancel = this._reconnectionScheduler(reconnect, delay, attemptCount);
356
- if (typeof cancel === 'function') {
357
- this._cancelReconnection = cancel;
358
- }
+ this._cancelReconnection = typeof cancel === 'function' ? cancel : undefined;
359
} else {
360
const handle = setTimeout(reconnect, delay);
361
this._cancelReconnection = () => clearTimeout(handle);
0 commit comments