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