Skip to content

Commit efd93fb

Browse files
committed
fixup: test
1 parent 9d1ee32 commit efd93fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/internal/streams/end-of-stream.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ function eos(stream, opts, callback) {
7272
(wState && wState.finished);
7373
const onfinish = () => {
7474
writableFinished = true;
75-
if (!readable) callback.call(stream);
75+
if (!readable || readableEnded) callback.call(stream);
7676
};
7777

7878
let readableEnded = stream.readableEnded ||
7979
(rState && rState.endEmitted);
8080
const onend = () => {
8181
readableEnded = true;
82-
if (!writable) callback.call(stream);
82+
if (!writable || writableFinished) callback.call(stream);
8383
};
8484

8585
const onerror = (err) => {

0 commit comments

Comments
 (0)