Skip to content

Commit

Permalink
exit early if conn got closed
Browse files Browse the repository at this point in the history
  • Loading branch information
panleone committed May 8, 2024
1 parent 67a1409 commit 44fcdee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,9 @@ export class ExplorerNetwork extends Network {
let receivedInvalidAnswer = false;
const id = this.send(method, params);
for (let i = 0; i < Math.floor(maxAwaitTime / frequency); i++) {
if (this.closed) {
break;
}
const res = this.cachedResults[id];
if (res !== undefined) {
delete this.cachedResults[id];
Expand Down

0 comments on commit 44fcdee

Please sign in to comment.