mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-09 16:28:06 +00:00
fix: ensure stale monitoring is stopped on WebSocket error and closure events in LighterGateway for improved connection management
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user