Skip to content

Commit

Permalink
tls: proxy handle.reading back to parent handle
Browse files Browse the repository at this point in the history
Fix: #995
PR-URL: #1004
Reviewed-By: Rod Vagg <[email protected]>
  • Loading branch information
indutny authored and rvagg committed Feb 28, 2015
1 parent 7887e11 commit 1ab7e80
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/_tls_wrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,14 @@ TLSSocket.prototype._wrapHandle = function(handle) {
res = tls_wrap.wrap(handle, context.context, options.isServer);
res._parent = handle;
res.reading = handle.reading;
Object.defineProperty(handle, 'reading', {
get: function readingGetter() {
return res.reading;
},
set: function readingSetter(value) {
res.reading = value;
}
});

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

0 comments on commit 1ab7e80

Please sign in to comment.