Skip to content

Commit

Permalink
Merge pull request #616 from thekiur/master
Browse files Browse the repository at this point in the history
This patch will prevent some random memory leaking.
  • Loading branch information
rauchg committed Nov 2, 2011
2 parents e20777d + 9e92075 commit 2bb60ac
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/manager.js
Expand Up @@ -267,7 +267,6 @@ Manager.prototype.initStore = function () {
this.connected = {};
this.open = {};
this.closed = {};
this.closedA = [];
this.rooms = {};
this.roomClients = {};

Expand Down Expand Up @@ -339,8 +338,6 @@ Manager.prototype.onOpen = function (id) {
if (this.closed[id]) {
var self = this;

this.closedA.splice(this.closedA.indexOf(id), 1);

this.store.unsubscribe('dispatch:' + id, function () {
delete self.closed[id];
});
Expand Down Expand Up @@ -429,7 +426,6 @@ Manager.prototype.onClose = function (id) {
}

this.closed[id] = [];
this.closedA.push(id);

var self = this;

Expand Down Expand Up @@ -504,7 +500,6 @@ Manager.prototype.onDisconnect = function (id, local) {

if (this.closed[id]) {
delete this.closed[id];
this.closedA.splice(this.closedA.indexOf(id), 1);
}

if (this.roomClients[id]) {
Expand Down

0 comments on commit 2bb60ac

Please sign in to comment.