mirror of
https://github.com/nodejs/node.git
synced 2025-05-05 15:32:15 +00:00

PR-URL: https://github.com/nodejs/node/pull/2205 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
20 lines
441 B
JavaScript
20 lines
441 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const stream = require('stream');
|
|
|
|
const r = new stream.Stream();
|
|
r.listenerCount = undefined;
|
|
|
|
const w = new stream.Stream();
|
|
w.listenerCount = undefined;
|
|
|
|
w.on('pipe', function() {
|
|
r.emit('error', new Error('Readable Error'));
|
|
w.emit('error', new Error('Writable Error'));
|
|
});
|
|
r.on('error', common.mustCall(noop));
|
|
w.on('error', common.mustCall(noop));
|
|
r.pipe(w);
|
|
|
|
function noop() {}
|