Fix E2E error

This commit is contained in:
Andras Schmelczer 2025-04-08 20:45:42 +01:00
parent 82e41e5b4e
commit 1bd9331bfa
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -273,11 +273,19 @@ export class Syncer {
public stop(): void {
clearInterval(this.refreshApplyRemoteChangesWebSocketInterval);
this.applyRemoteChangesWebSocket?.close();
try {
this.applyRemoteChangesWebSocket?.close();
} catch (e) {
this.logger.warn(`Failed to close WebSocket: ${e}`);
}
}
private updateWebSocket(settings: SyncSettings): void {
this.applyRemoteChangesWebSocket?.close();
try {
this.applyRemoteChangesWebSocket?.close();
} catch (e) {
this.logger.warn(`Failed to close WebSocket: ${e}`);
}
if (!settings.isSyncEnabled) {
this.applyRemoteChangesWebSocket = undefined;