0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/doc
Zwb a72a331536 doc: fix onReadable reentry after unshift called
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>
2016-08-26 21:59:55 -07:00
..
api doc: fix onReadable reentry after unshift called 2016-08-26 21:59:55 -07:00
api_assets doc: make the api doc print-friendly 2016-05-23 12:26:21 +02:00
changelogs 2016-08-26, Version 6.5.0 (Current) 2016-08-26 11:22:58 -05:00
ctc-meetings doc: add CTC meeting minutes 2016-08-03 2016-08-08 08:58:03 -07:00
guides doc: various documentation formatting fixes 2016-07-14 12:26:50 +03:00
topics doc: various documentation formatting fixes 2016-07-14 12:26:50 +03:00
tsc-meetings doc: various documentation formatting fixes 2016-07-14 12:26:50 +03:00
full-white-stripe.jpg build: update Node.js logo on Win installer 2016-03-06 20:22:36 -06:00
node.1 tty: set the handle to blocking mode 2016-08-10 23:41:28 +02:00
onboarding-extras.md doc: various documentation formatting fixes 2016-07-14 12:26:50 +03:00
onboarding.md doc: update Reviewing section of onboarding doc 2016-08-15 22:08:52 -07:00
osx_installer_logo.png build: update Node.js logo on OSX installer 2016-02-27 16:49:56 +11:00
releases.md doc: update release announce instruction to tweet 2016-08-18 09:48:32 -07:00
template.html doctool: improve the title of pages in doc 2016-08-04 12:17:58 -07:00
thin-white-stripe.jpg build: update Node.js logo on Win installer 2016-03-06 20:22:36 -06:00