diff --git a/lib/internal/stream_base_commons.js b/lib/internal/stream_base_commons.js index 233741285d2c72..4f48c2be794626 100644 --- a/lib/internal/stream_base_commons.js +++ b/lib/internal/stream_base_commons.js @@ -204,7 +204,8 @@ function onStreamRead(arrayBuffer) { } if (nread !== UV_EOF) { - // #34375 CallJSOnreadMethod expects the return value to be a buffer. + // CallJSOnreadMethod expects the return value to be a buffer. + // Ref: https://github.com/nodejs/node/pull/34375 stream.destroy(errnoException(nread, 'read')); return; } @@ -224,7 +225,8 @@ function onStreamRead(arrayBuffer) { if (handle.readStop) { const err = handle.readStop(); if (err) { - // #34375 CallJSOnreadMethod expects the return value to be a buffer. + // CallJSOnreadMethod expects the return value to be a buffer. + // Ref: https://github.com/nodejs/node/pull/34375 stream.destroy(errnoException(err, 'read')); return; }