Skip to content

Commit a18156c

Browse files
committed
Apply suggestions from code review
1 parent f199b1c commit a18156c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/internal/stream_base_commons.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,11 @@ function onStreamRead(arrayBuffer) {
205205
return;
206206
}
207207

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

211214
if (nread !== UV_EOF) {
212215
// CallJSOnreadMethod expects the return value to be a buffer.

src/crypto/crypto_tls.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1051,7 +1051,6 @@ void TLSWrap::OnStreamRead(ssize_t nread, const uv_buf_t& buf) {
10511051
Debug(this, "Read %zd bytes from underlying stream", nread);
10521052

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

0 commit comments

Comments
 (0)