*Update dist
This commit is contained in:
parent
e151647e8f
commit
e6ec3cdc4c
|
@ -1 +1 @@
|
|||
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../src/query/streaming.ts"],"names":[],"mappings":";AAAA,OAAO,cAAc,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,sBAAsB,CAAC;AACpE,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,cAAc;IAC3D,SAAS,CAAC,QAAQ,EAAE,wBAAwB,CAAC;IAC7C,SAAS,CAAC,SAAS,UAAS;gBAE1B,OAAO,EAAE,UAAU,EACnB,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,wBAAwB;IAM5B,MAAM;cAIG,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAqEjE"}
|
||||
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../src/query/streaming.ts"],"names":[],"mappings":";AAAA,OAAO,cAAc,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,sBAAsB,CAAC;AACpE,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,cAAc;IAC3D,SAAS,CAAC,QAAQ,EAAE,wBAAwB,CAAC;IAC7C,SAAS,CAAC,SAAS,UAAS;gBAE1B,OAAO,EAAE,UAAU,EACnB,KAAK,EAAE,MAAM,GAAG,MAAM,EACtB,KAAK,EAAE,UAAU,EACjB,OAAO,EAAE,wBAAwB;IAM5B,MAAM;cAIG,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAwEjE"}
|
|
@ -40,13 +40,14 @@ export default class StreamingRpcQuery extends SimpleRpcQuery {
|
|||
resolve(null);
|
||||
socket.end();
|
||||
};
|
||||
socket.on("data", (res) => {
|
||||
const listener = (res) => {
|
||||
relay = relay;
|
||||
if (timer && timer.close) {
|
||||
clearTimeout(timer);
|
||||
}
|
||||
if (this._canceled) {
|
||||
socket.write(pack({ cancel: true }));
|
||||
socket.off("data", listener);
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
|
@ -60,7 +61,8 @@ export default class StreamingRpcQuery extends SimpleRpcQuery {
|
|||
return;
|
||||
}
|
||||
this._options.streamHandler(response?.data.data);
|
||||
});
|
||||
};
|
||||
socket.on("data", listener);
|
||||
socket.on("error", (error) => {
|
||||
relay = relay;
|
||||
this._errors[relay] = error;
|
||||
|
|
Loading…
Reference in New Issue