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', () => {