diff --git a/src/exchanges/lighter/gateway.ts b/src/exchanges/lighter/gateway.ts index d4deedf..63cbcf4 100644 --- a/src/exchanges/lighter/gateway.ts +++ b/src/exchanges/lighter/gateway.ts @@ -557,6 +557,7 @@ export class LighterGateway { fail(new Error(`WebSocket closed before ready (code=${code}${normalizedReason ? `, reason=${normalizedReason}` : ""})`)); return; } + this.stopStaleMonitor(); this.scheduleReconnect(); }); ws.on("error", (error) => { @@ -566,6 +567,7 @@ export class LighterGateway { fail(error); return; } + this.stopStaleMonitor(); this.scheduleReconnect(); }); });