Skip to content

Commit ddd6c21

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: #25861 Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 24ea4a3 commit ddd6c21

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
@@ -280,19 +280,19 @@ function onerror(err) {
280280

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

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

295-
tls.read(0);
295+
tlsSocket.read(0);
296296
}
297297

298298
/**

0 commit comments

Comments
 (0)