forked from retoor/snek
Fix socket issue.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user