Skip to content

Commit

Permalink
Abort the runner when disconnected
Browse files Browse the repository at this point in the history
  • Loading branch information
kraenhansen committed Dec 14, 2023
1 parent c1baa5b commit 0f18e42
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/client/src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,11 @@ export class Client extends ClientEventEmitter {
}
};

// Abort the runner when disconnected
this.once("disconnection", () => {
runner.abort();
});

// Setup listeners for all events emitted by the runner
for (const name in Runner.constants) {
if (name.startsWith("EVENT")) {
Expand Down

0 comments on commit 0f18e42

Please sign in to comment.