Skip to content

Commit

Permalink
fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
freeman983 committed Jan 21, 2014
1 parent d69fb53 commit 8c823d8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,11 @@ Manager.prototype.onDisconnect = function (id) {
}
delete this.roomClients[id]
}

//add by freeman983 fix memory leak
if(this.sockets.sockets[id]){
delete this.sockets.sockets[id];
}

this.store.destroyClient(id, this.get('client store expiration'));
};
Expand Down

0 comments on commit 8c823d8

Please sign in to comment.