diff --git a/packages/client/src/Client.ts b/packages/client/src/Client.ts index 64546e7..47dce83 100644 --- a/packages/client/src/Client.ts +++ b/packages/client/src/Client.ts @@ -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")) {