connection issue fix
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user