Revert "*Switch from clearing the timeout to setting the _timeoutCanceled flag"

This reverts commit b50f7036ff.
This commit is contained in:
Derrick Hammer 2022-09-20 06:13:37 -04:00
parent b7978ddc0d
commit f9036e1c73
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 1 deletions

View File

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