Skip to content

Commit 1ab7e80

Browse files
indutnyrvagg
authored andcommitted
tls: proxy handle.reading back to parent handle
Fix: #995 PR-URL: #1004 Reviewed-By: Rod Vagg <[email protected]>
1 parent 7887e11 commit 1ab7e80

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/_tls_wrap.js

+8
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,14 @@ TLSSocket.prototype._wrapHandle = function(handle) {
282282
res = tls_wrap.wrap(handle, context.context, options.isServer);
283283
res._parent = handle;
284284
res.reading = handle.reading;
285+
Object.defineProperty(handle, 'reading', {
286+
get: function readingGetter() {
287+
return res.reading;
288+
},
289+
set: function readingSetter(value) {
290+
res.reading = value;
291+
}
292+
});
285293

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

0 commit comments

Comments
 (0)