Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d5ba121

Browse filesBrowse files
sam-githubtargos
authored andcommitted
tls: fix initRead socket argument name
"wrapped" argument is the caller's "socket", not its "wrap", and its referred to as "socket" in the comments, so call it that. PR-URL: #25153 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
1 parent acf7802 commit d5ba121
Copy full SHA for d5ba121

File tree

Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-3
lines changed
Open diff view settings
Collapse file

‎lib/_tls_wrap.js‎

Copy file name to clipboardExpand all lines: lib/_tls_wrap.js
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,15 +269,17 @@ function onerror(err) {
269269
}
270270
}
271271

272-
function initRead(tls, wrapped) {
272+
// Used by both client and server TLSSockets to start data flowing from _handle,
273+
// read(0) causes a StreamBase::ReadStart, via Socket._read.
274+
function initRead(tls, socket) {
273275
// If we were destroyed already don't bother reading
274276
if (!tls._handle)
275277
return;
276278

277279
// Socket already has some buffered data - emulate receiving it
278-
if (wrapped && wrapped.readableLength) {
280+
if (socket && socket.readableLength) {
279281
var buf;
280-
while ((buf = wrapped.read()) !== null)
282+
while ((buf = socket.read()) !== null)
281283
tls._handle.receive(buf);
282284
}
283285

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.