Skip to content

Commit

Permalink
tls: proxy handle.reading back to parent handle
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny committed Feb 28, 2015
1 parent 7887e11 commit d83c9a3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/_tls_wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,14 @@ TLSSocket.prototype._wrapHandle = function(handle) {
tls.createSecureContext();
res = tls_wrap.wrap(handle, context.context, options.isServer);
res._parent = handle;
res.reading = handle.reading;
Object.defineProperty(res, 'reading', {
get: function readingGetter() {
return handle.reading;
},
set: function readingSetter(value) {
handle.reading = value;
}
});

// Proxy HandleWrap, PipeWrap and TCPWrap methods
proxiedMethods.forEach(function(name) {
Expand Down

0 comments on commit d83c9a3

Please sign in to comment.