From d58f1b34f64dd1d3ba0d26728b810b5daccd1b10 Mon Sep 17 00:00:00 2001 From: Mikhail Yaskou <16704707+mikhail-yaskou@users.noreply.github.com> Date: Fri, 30 Oct 2026 10:33:47 +0200 Subject: [PATCH] Fix WebSocket startup after a port collision --- src/server/wsServer.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/server/wsServer.ts b/src/server/wsServer.ts index dee3acb5..62d12e7d 100644 --- a/src/server/wsServer.ts +++ b/src/server/wsServer.ts @@ -135,18 +135,10 @@ export class WSServer extends Disposable { const _handleWSError = (err: any): void => { if (err.code == 'EADDRINUSE') { this._connection.wsPort++; - this._wss = new WSServerWithOriginCheck({ - port: this._connection.wsPort, - host: this._connection.host, - path: this._connection.wsPath, - }); + this._startWSServer(basePath).then(resolve, reject); } else if (err.code == 'EADDRNOTAVAIL') { this._connection.resetHostToDefault(); - this._wss = new WSServerWithOriginCheck({ - port: this._connection.wsPort, - host: this._connection.host, - path: this._connection.wsPath, - }); + this._startWSServer(basePath).then(resolve, reject); } else { /* __GDPR__ "server.err" : {