Skip to content

Commit

Permalink
socket: fix flags
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Dec 24, 2012
1 parent d65635d commit dc17333
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ Socket.prototype.__proto__ = Emitter.prototype;
*/

exports.flags.forEach(function(flag){
Socket.prototype.__defineGetter__(flag, function(name){
this.flags.push(name);
Socket.prototype.__defineGetter__(flag, function(){
this.flags = this.flags || {};
this.flags[flag] = true;
return this;
});
});
Expand Down

0 comments on commit dc17333

Please sign in to comment.