*Change how we check/clear the timer
This commit is contained in:
parent
9a04c82a5b
commit
62ef56b554
|
@ -103,8 +103,9 @@ export default abstract class RpcQueryBase {
|
||||||
let timer: any;
|
let timer: any;
|
||||||
socket.on("data", (res: Buffer) => {
|
socket.on("data", (res: Buffer) => {
|
||||||
relay = relay as string;
|
relay = relay as string;
|
||||||
if (timer && timer.close) {
|
if (timer) {
|
||||||
clearTimeout(timer as any);
|
clearTimeout(timer as any);
|
||||||
|
timer = null;
|
||||||
}
|
}
|
||||||
socket.end();
|
socket.end();
|
||||||
const response = unpack(res as any) as RPCResponse;
|
const response = unpack(res as any) as RPCResponse;
|
||||||
|
|
Loading…
Reference in New Issue