Skip to content

Commit 1c3c9f3

Browse files
committed
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: nodejs#25861 Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent d3c7020 commit 1c3c9f3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/_tls_wrap.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,19 +279,19 @@ function onerror(err) {
279279

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

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

294-
tls.read(0);
294+
tlsSocket.read(0);
295295
}
296296

297297
/**

0 commit comments

Comments
 (0)