node/lib
Christopher Luke f5a702e763 stream: Fixes missing 'unpipe' event
Currently when the destination emits an 'error', 'finish' or 'close'
event the pipe calls unpipe to emit 'unpipe' and trigger the clean up
of all it's listeners.
When the source emits an 'end' event without {end: false} it calls
end() on the destination leading it to emit a 'close', this will again
lead to the pipe calling unpipe. However the source emitting an 'end'
event along side {end: false} is the only time the cleanup gets ran
directly without unpipe being called. This fixes that so the 'unpipe'
event does get emitted and cleanup in turn gets ran by that event.

Fixes: https://github.com/nodejs/node/issues/11837
PR-URL: https://github.com/nodejs/node/pull/11876
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-05-02 20:41:22 -05:00
..
internal process: fix permanent deoptimizations 2017-05-02 20:39:19 -05:00
_debug_agent.js lib: remove unused msg parameter in debug_agent 2017-03-20 11:24:09 -04:00
_debugger.js util, debugger: remove internalUtil.error 2017-02-22 21:05:10 +01:00
_http_agent.js lib: remove unnecessary assignments with _extend 2017-02-22 21:05:20 +01:00
_http_client.js http: use direct parameters instead 2017-01-31 15:05:40 -06:00
_http_common.js http: optimize default method case 2017-01-18 22:05:25 -05:00
_http_incoming.js http: reuse existing headers array for raw values 2017-01-04 10:44:08 -06:00
_http_outgoing.js http: add new functions to OutgoingMessage 2017-02-27 21:50:31 -05:00
_http_server.js tools: ignore URLs in line length linting 2017-04-10 18:47:48 -04:00
_linklist.js lib: use emitWarning instead of printDeprecationMessage 2016-09-02 13:15:22 -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: Fixes missing 'unpipe' event 2017-05-02 20:41:22 -05:00
_stream_transform.js stream: improve stream error messages 2016-10-10 15:15:54 -07:00
_stream_wrap.js stream: avoid using forEach 2017-03-20 10:38:24 -04:00
_stream_writable.js stream: avoid additional validation for Buffers 2017-01-27 08:11:47 -05:00
_tls_common.js crypto: freelist_max_len is gone in OpenSSL 1.1.0 2017-01-30 12:08:18 -05:00
_tls_legacy.js lib: remove unnecessary parameter for assertCrypto() 2017-01-27 08:12:04 -05:00
_tls_wrap.js Partial revert "tls: keep track of stream that is closed" 2017-03-28 19:26:56 -04:00
.eslintrc.yaml tools: rename eslintrc to an undeprecated format 2017-01-30 12:08:28 -05:00
assert.js assert: apply minor refactoring 2017-02-25 11:24:34 -05:00
buffer.js buffer: use slightly faster NaN check 2017-05-02 12:46:10 -05:00
child_process.js lib: clarify the usage of 'else' 2017-03-28 19:26:54 -04:00
cluster.js cluster: refactor module into multiple files 2017-01-30 12:08:44 -05:00
console.js console: name anonymous functions 2016-10-17 09:44:52 -07:00
constants.js constants: errors -> errno 2016-12-05 03:33:34 +01:00
crypto.js crypto: add randomFill and randomFillSync 2017-05-01 11:16:07 -05:00
dgram.js tools: enable no-useless-return eslint rule 2017-05-02 12:46:18 -05:00
dns.js dns: minor refactor of dns module 2017-03-05 23:28:39 +01:00
domain.js test,lib,benchmark: match function names 2016-10-20 09:32:45 -07:00
events.js events: do not keep arrays with a single listener 2017-04-10 13:44:37 -04:00
fs.js fs: fix permanent deoptimizations 2017-05-02 20:39:18 -05:00
http.js http: name anonymous functions in http 2016-10-18 21:10:38 -07:00
https.js url: allow use of URL with http.request and https.request 2017-01-30 12:08:37 -05:00
module.js lib: fix typo in comments in module.js 2017-05-02 12:46:17 -05:00
net.js net: fix permanent deoptimizations 2017-05-02 20:39:20 -05:00
os.js os: improve cpus() performance 2017-03-05 23:24:54 +01:00
path.js path: fallback to process cwd when resolving drive cwd 2016-09-29 11:14:49 -07:00
process.js src: remove excessive license boilerplate 2015-01-27 16:35:05 +11:00
punycode.js lib: remove let from for loops 2016-10-06 11:51:53 -07:00
querystring.js url: fix surrogate handling in encodeAuth() 2017-02-21 21:14:24 -05:00
readline.js readline: fix permanent deoptimizations 2017-05-02 20:39:20 -05:00
repl.js repl: avoid using forEach 2017-03-20 10:38:55 -04:00
stream.js stream: move legacy to lib/internal dir 2017-02-14 11:51:47 -05:00
string_decoder.js string_decoder: fix bad utf8 character handling 2016-06-23 23:18:10 -04:00
sys.js lib: use emitWarning instead of printDeprecationMessage 2016-09-02 13:15:22 -07:00
timers.js timers: fix not to close reused timer handle 2017-03-28 19:06:17 -04:00
tls.js lib: remove unnecessary parameter for assertCrypto() 2017-01-27 08:12:04 -05:00
tty.js tty: avoid oob warning in TTYWrap::GetWindowSize() 2017-02-22 21:05:22 +01:00
url.js url: improve descriptiveness of identifier 2017-05-02 12:46:17 -05:00
util.js util: add %i and %f formatting specifiers 2017-04-10 13:22:41 -04:00
v8.js lib,src: support values > 4GB in heap statistics 2017-01-27 08:11:44 -05:00
vm.js vm: refactor vm module 2017-02-22 20:54:31 +01:00
zlib.js zlib: fix linting recently-introduced lint error 2016-11-22 06:32:14 +01:00