mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
http: Handle end only when stream is not dumped
This fixes regression introduced in some cases by 8bf0c15
This commit is contained in:
1 parent
0db521d0b0
commit
d76eacd4e6
1 file changed
+3
-1
+3
-1
@@ -160,7 +160,9 @@ function parserOnMessageComplete() {
|
||||
stream._readableState.onread(null, null);
|
||||
}
|
||||
|
||||
if (!stream._readableState.endEmitted && !parser.incoming._pendings.length) {
|
||||
if (stream &&
|
||||
!stream._readableState.endEmitted &&
|
||||
!parser.incoming._pendings.length) {
|
||||
// For emit end event
|
||||
stream._readableState.onread(null, null);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user