Try fixing hanging e2e tests #183

Merged
schmelczer merged 11 commits from asch/dead-locks into main 2025-12-14 17:19:25 +00:00
Showing only changes of commit 9c5882e5fb - Show all commits

Handle websocket race condition

Andras Schmelczer 2025-12-14 11:05:55 +00:00

View file

@ -188,6 +188,11 @@ export class WebSocketManager {
this.webSocket = new this.webSocketFactoryImplementation(wsUri); this.webSocket = new this.webSocketFactoryImplementation(wsUri);
this.webSocket.onopen = (): void => { this.webSocket.onopen = (): void => {
// Check if we've been stopped while connecting
if (this.isStopped) {
this.webSocket?.close(1000, "WebSocketManager was stopped during connection");
return;
}
this.logger.info("WebSocket connection opened"); this.logger.info("WebSocket connection opened");
this.onWebSocketStatusChanged.trigger(true); this.onWebSocketStatusChanged.trigger(true);
}; };