Skip to content

Commit ebea6f5

Browse files
authored
Apply suggestions from code review
1 parent 29a37fc commit ebea6f5

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lib/internal/stream_base_commons.js

+5-2
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

-1
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,6 @@ void TLSWrap::OnStreamRead(ssize_t nread, const uv_buf_t& buf) {
10821082
Debug(this, "Read %zd bytes from underlying stream", nread);
10831083

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

0 commit comments

Comments
 (0)