From 22a1fd3a1a93a3a3c02d1d4b3beea6f813bba82a Mon Sep 17 00:00:00 2001 From: rosetta Date: Sat, 31 Jan 2026 04:07:29 +0200 Subject: [PATCH] connection issue fix --- app/providers/ProtocolProvider/ProtocolProvider.tsx | 1 + app/providers/ProtocolProvider/protocol/protocol.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/providers/ProtocolProvider/ProtocolProvider.tsx b/app/providers/ProtocolProvider/ProtocolProvider.tsx index e60b1b8..fe89538 100644 --- a/app/providers/ProtocolProvider/ProtocolProvider.tsx +++ b/app/providers/ProtocolProvider/ProtocolProvider.tsx @@ -44,6 +44,7 @@ export function ProtocolProvider(props : ProtocolProviderProps) { deviceName: systemInfo.name, deviceOs: systemInfo.os } + protocol.connect(); protocol.startHandshakeExchange(publicKey, privateKey, device); protocol.on('connect', () => { protocol.startHandshakeExchange(publicKey, privateKey, device); diff --git a/app/providers/ProtocolProvider/protocol/protocol.ts b/app/providers/ProtocolProvider/protocol/protocol.ts index 7fcc486..5ae939a 100644 --- a/app/providers/ProtocolProvider/protocol/protocol.ts +++ b/app/providers/ProtocolProvider/protocol/protocol.ts @@ -131,7 +131,7 @@ export default class Protocol extends EventEmitter { return this._packetWaiters.get(packetId)!; } - private connect() { + public connect() { this.socket = new WebSocket(this.serverAddress); this.socket.addEventListener('open', () => {