Fix races where Socket is closed before Websocket is created
This commit is contained in:
parent
1b4ac0d711
commit
1ade8e175f
@ -107,6 +107,11 @@ export default class Connection {
|
||||
console.warn("Could not load relay information", e);
|
||||
}
|
||||
|
||||
if (this.IsClosed) {
|
||||
this._UpdateState();
|
||||
return;
|
||||
}
|
||||
|
||||
this.IsClosed = false;
|
||||
this.Socket = new WebSocket(this.Address);
|
||||
this.Socket.onopen = (e) => this.OnOpen(e);
|
||||
|
Loading…
x
Reference in New Issue
Block a user