-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't pipe to a stream without listenerCount #2655
Comments
Was introduced in 8f58fb9. I'm on it. |
@calvinmetcalf Can you please explain with a small program to reproduce the problem? |
@calvinmetcalf I understand the gist of the issue, but I can't seem to reproduce it with this? 'use strict';
var common = require('../common');
var 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.pipe(w);
EDIT: fixed. |
Does this only show up when using custom event-emitter solutions? |
@Fishrock123 You had to 'use strict';
var 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'));
});
r.pipe(w); Also, thanks for helping me understand the problem :-) |
Now parts of our public and public-ish APIs fall back to old-style listenerCount() if the emitter does not have a listenerCount function. Fixes: nodejs#2655 Refs: 8f58fb9 PR-URL: nodejs#2661 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Fixed in b513a33 @calvinmetcalf if you could confirm, that'd be 💯 |
Now parts of our public and public-ish APIs fall back to old-style listenerCount() if the emitter does not have a listenerCount function. Fixes: #2655 Refs: 8f58fb9 PR-URL: #2661 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Now parts of our public and public-ish APIs fall back to old-style listenerCount() if the emitter does not have a listenerCount function. Fixes: nodejs#2655 Refs: 8f58fb9 PR-URL: nodejs#2661 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
will look in the morning thanks! |
👍 |
Now parts of our public and public-ish APIs fall back to old-style listenerCount() if the emitter does not have a listenerCount function. Fixes: #2655 Refs: 8f58fb9 PR-URL: #2661 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Now parts of our public and public-ish APIs fall back to old-style listenerCount() if the emitter does not have a listenerCount function. Fixes: #2655 Refs: 8f58fb9 PR-URL: #2661 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Now parts of our public and public-ish APIs fall back to old-style listenerCount() if the emitter does not have a listenerCount function. Fixes: #2655 Refs: 8f58fb9 PR-URL: #2661 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Now parts of our public and public-ish APIs fall back to old-style listenerCount() if the emitter does not have a listenerCount function. Fixes: #2655 Refs: 8f58fb9 PR-URL: #2661 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
just noticed this when looking into upgrading readable stream to v3.3.0
The text was updated successfully, but these errors were encountered: