Skip to content

Commit dc17333

Browse files
committed
socket: fix flags
1 parent d65635d commit dc17333

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/socket.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ Socket.prototype.__proto__ = Emitter.prototype;
7676
*/
7777

7878
exports.flags.forEach(function(flag){
79-
Socket.prototype.__defineGetter__(flag, function(name){
80-
this.flags.push(name);
79+
Socket.prototype.__defineGetter__(flag, function(){
80+
this.flags = this.flags || {};
81+
this.flags[flag] = true;
8182
return this;
8283
});
8384
});

0 commit comments

Comments
 (0)