mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
a72a331536
In example parseHeader, stream listen **readable** event, if call stream.unshift(buf) before stream.removeListener('readable', onReadable), readable event will be emited before removeListener, so callback will not been called correctlly. After change to ```js stream.removeListener('error', callback); stream.removeListener('readable', onReadable); if (buf.length) stream.unshift(buf); ``` It solves this problem. PR-URL: https://github.com/nodejs/node/pull/8200 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> |
||
---|---|---|
.. | ||
api | ||
api_assets | ||
changelogs | ||
ctc-meetings | ||
guides | ||
topics | ||
tsc-meetings | ||
full-white-stripe.jpg | ||
node.1 | ||
onboarding-extras.md | ||
onboarding.md | ||
osx_installer_logo.png | ||
releases.md | ||
template.html | ||
thin-white-stripe.jpg |