fixed socket destroying if connected is -1 (the connection is closed by server during authorization phase)

This commit is contained in:
hell
2014-08-26 13:36:32 +02:00
parent ba3a311e69
commit 6ba5818884

View File

@@ -369,7 +369,8 @@ public class Manager extends Emitter {
/*package*/ void destroy(Socket socket) { /*package*/ void destroy(Socket socket) {
--this.connected; --this.connected;
if (this.connected == 0) { if (this.connected <= 0) {
this.connected = 0;
this.close(); this.close();
} }
} }