Skip to content

Commit 4d0b56f

Browse files
sam-githubaddaleax
authored andcommitted
tls: don't shadow the tls global with a local
`tls` shadows the global `tls` require, and isn't indicative of the arument type. PR-URL: #25861 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent b5a8376 commit 4d0b56f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/_tls_wrap.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -277,19 +277,19 @@ function onerror(err) {
277277

278278
// Used by both client and server TLSSockets to start data flowing from _handle,
279279
// read(0) causes a StreamBase::ReadStart, via Socket._read.
280-
function initRead(tls, socket) {
280+
function initRead(tlsSocket, socket) {
281281
// If we were destroyed already don't bother reading
282-
if (!tls._handle)
282+
if (!tlsSocket._handle)
283283
return;
284284

285285
// Socket already has some buffered data - emulate receiving it
286286
if (socket && socket.readableLength) {
287287
var buf;
288288
while ((buf = socket.read()) !== null)
289-
tls._handle.receive(buf);
289+
tlsSocket._handle.receive(buf);
290290
}
291291

292-
tls.read(0);
292+
tlsSocket.read(0);
293293
}
294294

295295
/**

0 commit comments

Comments
 (0)