Commit 3e3bfc57 authored by Roee Kasher's avatar Roee Kasher Committed by James M Snell
Browse files

src: unconsume stream fix in internal http impl

When emitting a 'connection' event on a httpServer, the function
connectionListener is called. Then, a new parser is created, and
'consume' method is called on the socket's externalStream. However,
if this stream was already consumed and unconsumed, the process
crashes with a cpp assert from the 'Consume' method in stream_base.h.
This commit makes sure that no SIGABRT will be raised and the process
will stay alive (after emitting the socket).

PR-URL: https://github.com/nodejs/node/pull/11015


Reviewed-By: default avatarFedor Indutny <fedor.indutny@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent 10b687b5
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment