From 62ef56b554b0d6f9e69652a17b30bffa99d3ae8b Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Fri, 9 Sep 2022 22:04:55 -0400 Subject: [PATCH] *Change how we check/clear the timer --- src/query/base.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/query/base.ts b/src/query/base.ts index d99c2ca..434fa32 100644 --- a/src/query/base.ts +++ b/src/query/base.ts @@ -103,8 +103,9 @@ export default abstract class RpcQueryBase { let timer: any; socket.on("data", (res: Buffer) => { relay = relay as string; - if (timer && timer.close) { + if (timer) { clearTimeout(timer as any); + timer = null; } socket.end(); const response = unpack(res as any) as RPCResponse;