mirror of https://github.com/nodejs/node.git
993bb93e0a
This prevents the following sort of thing from being confusing: ```javascript stream.on('data', function() { console.error('got data'); }); stream.pause(); // stop reading // turns out no data is available stream.push(null); // Hand the stream to someone else, who does stuff... setTimeout(function() { // too late! 'end' is already emitted! stream.on('end', function() { console.error('got end'); }); }); ``` With this change, the `end` event is not emitted until you call `read()` *past* the EOF null. So, a paused stream will not swallow the `end` event and emit it before you `resume()` the stream. |
||
---|---|---|
.. | ||
addons | ||
disabled | ||
fixtures | ||
gc | ||
internet | ||
message | ||
pummel | ||
simple | ||
common.js |