*Switch from clearing the timeout to setting the _timeoutCanceled flag
This commit is contained in:
parent
309b9b0ac6
commit
b50f7036ff
|
@ -55,10 +55,7 @@ export default class StreamingRpcQuery extends SimpleRpcQuery {
|
||||||
|
|
||||||
const listener = (res: Buffer) => {
|
const listener = (res: Buffer) => {
|
||||||
relay = relay as string;
|
relay = relay as string;
|
||||||
if (this._timeoutTimer) {
|
this._timeoutCanceled = true;
|
||||||
clearTimeout(this._timeoutTimer as any);
|
|
||||||
this._timeoutTimer = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this._canceled) {
|
if (this._canceled) {
|
||||||
socket.write(pack({ cancel: true }));
|
socket.write(pack({ cancel: true }));
|
||||||
|
|
Loading…
Reference in New Issue