node/lib
David Halls b0225e5926 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-15 21:50:10 -05:00
..
internal debugger: fix --debug-brk interaction with -e 2016-06-15 17:46:14 -05:00
.eslintrc tools: add buffer-constructor eslint rule 2016-03-18 17:05:18 -07:00
_debug_agent.js lib: refactor code with startsWith/endsWith 2016-03-23 15:58:52 +02:00
_debugger.js debugger: remove obsolete setTimeout 2016-06-15 18:08:18 -05:00
_http_agent.js tls,https: respect address family when connecting 2016-06-02 22:41:59 +10:00
_http_client.js http: wait for both prefinish/end to keepalive 2016-06-15 18:02:01 -05:00
_http_common.js http: optimize checkInvalidHeaderChar() 2016-06-15 21:49:27 -05:00
_http_incoming.js http: fix no dumping after maybeReadMore 2016-06-15 21:50:05 -05:00
_http_outgoing.js buffer: add .from(), .alloc() and .allocUnsafe() 2016-03-16 08:34:02 -07:00
_http_server.js tools: lint for object literal spacing 2016-05-17 08:16:09 -05:00
_linklist.js lib,test: deprecate _linklist 2015-10-08 17:32:08 -07: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-15 21:50:10 -05:00
_stream_transform.js stream: prevent object map change in TransformState 2016-02-02 13:05:04 -06:00
_stream_wrap.js stream_wrap: error if stream has StringDecoder 2015-12-06 21:55:25 -05:00
_stream_writable.js doc: make writable.setDefaultEncoding() return this 2016-05-03 20:20:38 -04:00
_tls_common.js tls: scope loop vars with let 2016-01-26 20:53:05 +01:00
_tls_legacy.js lib: replace legacy uses of __defineGetter__ 2016-05-17 08:39:13 -05:00
_tls_wrap.js tls,https: respect address family when connecting 2016-06-02 22:41:59 +10:00
assert.js assert: allow circular references 2016-05-03 20:20:36 -04:00
buffer.js buffer: ignore negative allocation lengths 2016-06-02 22:42:03 +10:00
child_process.js child_process: measure buffer length in bytes 2016-06-02 22:40:45 +10:00
cluster.js cluster: don't send messages if no IPC channel 2016-06-15 18:11:35 -05:00
console.js console: timeEnd() with no label emits warning 2016-04-26 12:16:38 -07:00
constants.js Remove excessive copyright/license boilerplate 2015-01-12 15:30:28 -08:00
crypto.js lib: replace legacy uses of __defineGetter__ 2016-05-17 08:39:13 -05:00
dgram.js dgram: copy the list in send 2016-06-02 22:40:47 +10:00
dns.js dns: Use object without protoype for map 2016-03-22 11:13:03 -07:00
domain.js lib: reduce usage of self = this 2016-03-21 15:48:51 -07:00
events.js events: pass the original listener added by once 2016-05-03 20:20:35 -04:00
fs.js fs: execute mkdtemp's callback with no context 2016-06-15 17:47:11 -05:00
http.js lib,src: remove usage of events.EventEmitter 2015-09-23 00:23:08 +05:30
https.js crypto: fail early when loading crypto without openssl 2016-03-23 10:34:40 -07:00
module.js src,module: add --preserve-symlinks command line flag 2016-05-17 08:52:27 -05:00
net.js net: introduce Socket#connecting property 2016-05-03 20:20:30 -04:00
os.js os: add userInfo() method 2016-04-26 12:16:00 -07:00
path.js path: fix basename() regressions 2016-06-02 22:37:00 +10: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 benchmark,test,lib: remove extra spaces 2016-05-17 08:01:12 -05:00
readline.js repl: copying tabs shouldn't trigger completion 2016-05-17 08:52:13 -05:00
repl.js repl: refine handling of illegal tokens 2016-06-15 17:47:17 -05:00
stream.js lib,src: remove usage of events.EventEmitter 2015-09-23 00:23:08 +05:30
string_decoder.js string_decoder: rewrite implementation 2016-06-02 22:41:59 +10:00
sys.js util: introduce printDeprecationMessage function 2015-06-04 10:59:43 +03:00
timers.js timers: fixing API refs to use safe internal refs 2016-03-28 16:18:14 -07:00
tls.js benchmark,test,lib: remove extra spaces 2016-05-17 08:01:12 -05:00
tty.js tty: use blocking mode on OS X 2016-06-02 22:42:04 +10:00
url.js url: drop auth in url.resolve() if host changes 2016-04-26 12:16:39 -07:00
util.js util: pretty-print SIMD types 2016-06-02 22:39:16 +10:00
v8.js v8,src: expose statistics about heap spaces 2016-01-18 11:44:00 -05:00
vm.js lib: reduce util.is*() usage 2015-01-31 23:47:29 -05:00
zlib.js zlib: release callback and buffer after processing 2016-06-02 22:41:58 +10:00