We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54fc9a1 commit 52863d5Copy full SHA for 52863d5
lib/_tls_wrap.js
@@ -481,8 +481,9 @@ function TLSSocket(socket, opts) {
481
let wrap;
482
// Ideally, the readableLength check would not be necessary, and we would
483
// have a way to handle the buffered data at the C++ StreamBase level.
484
- if (((socket instanceof net.Socket && socket._handle) || !socket) &&
485
- socket.readableLength === 0) {
+ if ((socket instanceof net.Socket &&
+ socket._handle &&
486
+ socket.readableLength === 0) || !socket) {
487
// 1. connected socket
488
// 2. no socket, one will be created with net.Socket().connect
489
wrap = socket;
0 commit comments