node/lib
David Halls a08a0179e9 stream: ensure awaitDrain is increased once
Guard against the call to write() inside pipe's ondata pushing more data
back onto the Readable, thus causing ondata to be called again.

This is fine but results in awaitDrain being increased more than once.
The problem with that is when the destination does drain, only a single
'drain' event is emitted, so awaitDrain in this case will never reach
zero and we end up with a permanently paused stream.

Fixes: https://github.com/nodejs/node/issues/7278
PR-URL: https://github.com/nodejs/node/pull/7292
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-06-23 17:26:39 -07:00
..
internal repl: create history file with mode 0600 2016-06-23 16:59:38 -07:00
.eslintrc tools: apply custom buffer lint rule to /lib only 2016-03-21 12:57:59 -07:00
_debug_agent.js lib: refactor code with startsWith/endsWith 2016-04-08 17:16:43 -04:00
_debugger.js debugger: display array contents in repl 2016-06-23 17:25:05 -07:00
_http_agent.js https: fix ssl socket leak when keepalive is used 2016-03-30 13:12:15 -07:00
_http_client.js http: Corrects IPv6 address in Host header 2016-05-17 17:24:38 -07:00
_http_common.js http: speed up checkIsHttpToken 2016-06-23 16:59:39 -07:00
_http_incoming.js http: remove old, confusing comment 2016-03-21 12:57:55 -07:00
_http_outgoing.js http: remove unnecessary check 2016-03-21 12:57:55 -07:00
_http_server.js http: disallow sending obviously invalid status codes 2016-05-17 17:24:50 -07:00
_linklist.js Remove excessive copyright/license boilerplate 2015-01-12 15:30:28 -08:00
_stream_duplex.js node: allow multiple arguments passed to nextTick 2015-04-15 17:02:21 -06:00
_stream_passthrough.js lib: use const to define constants 2015-01-21 16:21:31 -05:00
_stream_readable.js stream: ensure awaitDrain is increased once 2016-06-23 17:26:39 -07:00
_stream_transform.js stream: prevent object map change in TransformState 2016-03-21 12:57:54 -07:00
_stream_wrap.js stream_wrap: error if stream has StringDecoder 2015-12-23 08:38:33 -08:00
_stream_writable.js streams: support unlimited synchronous cork/uncork cycles 2016-05-04 10:19:04 -07:00
_tls_common.js tls: scope loop vars with let 2016-03-02 14:01:11 -08:00
_tls_legacy.js lib: use arrow functions instead of bind 2016-03-02 14:01:11 -08:00
_tls_wrap.js lib: copy arguments object instead of leaking it 2016-03-30 13:12:12 -07:00
assert.js assert: respect assert.doesNotThrow message. 2016-05-17 17:24:38 -07:00
buffer.js lib,test: update in preparation for linter update 2016-06-23 17:25:14 -07:00
child_process.js lib,test,tools: alignment on variable assignments 2016-06-23 16:59:37 -07:00
cluster.js lib: refactor code with startsWith/endsWith 2016-04-08 17:16:43 -04:00
console.js console: check that stderr is writable 2016-03-30 13:12:14 -07:00
constants.js Remove excessive copyright/license boilerplate 2015-01-12 15:30:28 -08:00
crypto.js streams: refactor LazyTransform to internal/ 2015-09-15 13:53:21 -04:00
dgram.js lib: reduce usage of self = this 2016-03-30 13:12:13 -07:00
dns.js dns: Use object without protoype for map 2016-04-08 17:23:45 -04:00
domain.js domains: fix handling of uncaught exceptions 2015-12-23 08:38:33 -08:00
events.js lib,test: remove extra semicolons 2016-03-02 14:01:11 -08:00
freelist.js lib,test: add freelist deprecation and test 2015-07-17 19:48:31 -07:00
fs.js fs: Remove unused branches 2016-04-08 16:42:49 -04:00
http.js lib,src: remove usage of events.EventEmitter 2015-09-23 08:39:34 +10:00
https.js lib: reduce usage of self = this 2016-03-30 13:12:13 -07:00
module.js module: refactor redeclared variable 2016-03-02 14:01:11 -08:00
net.js net: replace __defineGetter__ with defineProperty 2016-06-23 16:59:38 -07:00
os.js lib: refactor code with startsWith/endsWith 2016-04-08 17:16:43 -04:00
path.js lib: scope loop variables 2016-03-02 14:01:11 -08:00
process.js src: remove excessive license boilerplate 2015-01-27 16:35:05 +11:00
punycode.js lib: add missing new for errors lib/*.js 2015-03-24 12:42:15 -07:00
querystring.js querystring: don't stringify bad surrogate pair 2016-04-11 11:10:47 -04:00
readline.js lib,test: update in preparation for linter update 2016-06-23 17:25:14 -07:00
repl.js lib,test,tools: alignment on variable assignments 2016-06-23 16:59:37 -07:00
stream.js lib,src: remove usage of events.EventEmitter 2015-09-23 08:39:34 +10:00
string_decoder.js string_decoder: fix performance regression 2016-03-21 12:57:54 -07:00
sys.js util: introduce printDeprecationMessage function 2015-06-04 10:59:43 +03:00
timers.js tools: add Node.js-specific ESLint rules 2016-03-21 12:57:57 -07:00
tls.js lib: refactor code with startsWith/endsWith 2016-04-08 17:16:43 -04:00
tty.js util: prepend '(node) ' to deprecation messages 2015-07-03 16:32:29 +02:00
url.js url: group slashed protocols by protocol name 2016-03-21 12:57:59 -07:00
util.js lib,test,tools: alignment on variable assignments 2016-06-23 16:59:37 -07:00
v8.js src: add total_available_size to v8 statistics 2015-08-11 22:51:50 +02:00
vm.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
zlib.js lib,test,tools: alignment on variable assignments 2016-06-23 16:59:37 -07:00