Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Nov 27, 2021
1 parent f199b1c commit a18156c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 5 additions & 2 deletions lib/internal/stream_base_commons.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,11 @@ function onStreamRead(arrayBuffer) {
return;
}

// note: handle should never deliver any more read events after this point.
// (equivalently, it should have called readStop on itself alread).
// After seeing EOF, most streams will be closed permanently,
// and will not deliver any more read events after this point.
// (equivalently, it should have called readStop on itself already).
// Some streams may be reset and explicitly started again with a call
// to readStart, such as TTY.

if (nread !== UV_EOF) {
// CallJSOnreadMethod expects the return value to be a buffer.
Expand Down
1 change: 0 additions & 1 deletion src/crypto/crypto_tls.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,6 @@ void TLSWrap::OnStreamRead(ssize_t nread, const uv_buf_t& buf) {
Debug(this, "Read %zd bytes from underlying stream", nread);

// Ignore everything after close_notify (rfc5246#section-7.2.1)
// TODO: unregister our interest in read events
if (eof_)
return;

Expand Down

0 comments on commit a18156c

Please sign in to comment.