fix: don't process socket.connect() if we are already re-connecting (#577)
This commit is contained in:
@@ -191,6 +191,10 @@ public class Manager extends Emitter {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isReconnecting() {
|
||||||
|
return reconnecting;
|
||||||
|
}
|
||||||
|
|
||||||
public int reconnectionAttempts() {
|
public int reconnectionAttempts() {
|
||||||
return this._reconnectionAttempts;
|
return this._reconnectionAttempts;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ public class Socket extends Emitter {
|
|||||||
EventThread.exec(new Runnable() {
|
EventThread.exec(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if (Socket.this.connected) return;
|
if (Socket.this.connected || Socket.this.io.isReconnecting()) return;
|
||||||
|
|
||||||
Socket.this.subEvents();
|
Socket.this.subEvents();
|
||||||
Socket.this.io.open(); // ensure open
|
Socket.this.io.open(); // ensure open
|
||||||
|
|||||||
Reference in New Issue
Block a user