We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd12dc9 commit f309cecCopy full SHA for f309cec
lib/_tls_wrap.js
@@ -271,15 +271,17 @@ function onerror(err) {
271
}
272
273
274
-function initRead(tls, wrapped) {
+// Used by both client and server TLSSockets to start data flowing from _handle,
275
+// read(0) causes a StreamBase::ReadStart, via Socket._read.
276
+function initRead(tls, socket) {
277
// If we were destroyed already don't bother reading
278
if (!tls._handle)
279
return;
280
281
// Socket already has some buffered data - emulate receiving it
- if (wrapped && wrapped.readableLength) {
282
+ if (socket && socket.readableLength) {
283
var buf;
- while ((buf = wrapped.read()) !== null)
284
+ while ((buf = socket.read()) !== null)
285
tls._handle.receive(buf);
286
287
0 commit comments