Merge pull request #34 from hellpf/master

fixed socket destroying if connected is -1
This commit is contained in:
Naoyuki Kanezawa
2014-08-26 23:16:39 +09:00

View File

@@ -382,7 +382,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();
} }
} }