Skip to content

Commit fef3c07

Browse files
committed
fixup
1 parent b9d1dda commit fef3c07

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ function isRequest(stream) {
2121
return stream.setHeader && typeof stream.abort === 'function';
2222
}
2323

24-
function isOutgoingMessage(stream) {
24+
function isServerResponse(stream) {
2525
return (
26+
typeof stream._sent100 === 'boolean' &&
2627
typeof stream._removedConnection === 'boolean' &&
2728
typeof stream._removedContLen === 'boolean' &&
2829
typeof stream._removedTE === 'boolean' &&
@@ -89,7 +90,7 @@ function eos(stream, options, callback) {
8990
// TODO (ronag): Improve soft detection to include core modules and
9091
// common ecosystem modules that do properly emit 'close' but fail
9192
// this generic check.
92-
let willEmitClose = isOutgoingMessage(stream) || (
93+
let willEmitClose = isServerResponse(stream) || (
9394
state &&
9495
state.autoDestroy &&
9596
(state.emitClose || isSocket(stream)) &&

0 commit comments

Comments
 (0)