mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
http: Handle end only when stream is not dumped
This fixes regression introduced in some cases by 8bf0c15
This commit is contained in:
@@ -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