Fix socket issue.
This commit is contained in:
parent
a1afaacb2e
commit
e3afc1ba6e
@ -183,8 +183,9 @@ class Socket extends EventHandler {
|
||||
const me = this
|
||||
if (this.isConnected || this.isConnecting) {
|
||||
return new Promise((resolve) => {
|
||||
if(me.isConnected)resolve(me)
|
||||
else if(me.isConnecting)
|
||||
me.connectPromises.push(resolve);
|
||||
if (!me.isConnecting) resolve(me);
|
||||
});
|
||||
}
|
||||
this.isConnecting = true;
|
||||
|
Loading…
Reference in New Issue
Block a user