Remove handlers before disconnecting the socket

This commit is contained in:
Yemel Jardi 2014-08-29 11:22:22 -03:00
parent 862dfa72c9
commit 2989fe1da4
1 changed files with 1 additions and 0 deletions

View File

@ -35,6 +35,7 @@ Network.prototype.cleanUp = function() {
this.criticalErr = '';
this.removeAllListeners();
if (this.socket) {
this.socket.removeAllListeners();
this.socket.disconnect();
this.socket = null;
}