*Switch from clearing the timeout to setting the _timeoutCanceled flag

This commit is contained in:
Derrick Hammer 2022-09-18 16:02:39 -04:00
parent 309b9b0ac6
commit b50f7036ff
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 4 deletions

View File

@ -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 }));