Skip to content

Commit

Permalink
Changed; make sure to cache a reference to the client object so that …
Browse files Browse the repository at this point in the history
…it can be

referenced after its destroying and before the data expires.
  • Loading branch information
rauchg committed Jun 29, 2011
1 parent abc3723 commit ba3b854
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions lib/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ function Socket (manager, id, nsp, readable) {
this.acks = {};
this.setFlags();
this.readable = readable;
this.store = this.manager.store.client(this.id);
};

/**
Expand All @@ -62,16 +63,6 @@ function Socket (manager, id, nsp, readable) {

Socket.prototype.__proto__ = EventEmitter.prototype;

/**
* Accessor shortcut for the store for the client.
*
* @api private
*/

Socket.prototype.__defineGetter__('store', function () {
return this.manager.store.client(this.id);
});

/**
* Accessor shortcut for the handshake data
*
Expand Down

0 comments on commit ba3b854

Please sign in to comment.