From b50f7036ffadf6c51a570c07fc4feaa1f5293b48 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 18 Sep 2022 16:02:39 -0400 Subject: [PATCH] *Switch from clearing the timeout to setting the _timeoutCanceled flag --- src/query/streaming.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/query/streaming.ts b/src/query/streaming.ts index 935657c..0245a5c 100644 --- a/src/query/streaming.ts +++ b/src/query/streaming.ts @@ -55,10 +55,7 @@ export default class StreamingRpcQuery extends SimpleRpcQuery { const listener = (res: Buffer) => { relay = relay as string; - if (this._timeoutTimer) { - clearTimeout(this._timeoutTimer as any); - this._timeoutTimer = null; - } + this._timeoutCanceled = true; if (this._canceled) { socket.write(pack({ cancel: true }));