Repository navigation
can't pipe to a stream without listenerCount #2655
Copy link
Copy link
Closed
Labels
streamIssues and PRs related to Node.js streams.Issues and PRs related to Node.js streams.
Milestone
Description
Activity
- addedstreamIssues and PRs related to Node.js streams.Issues and PRs related to Node.js streams.
on Sep 2, 2015 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);
To my understanding that should cause this error?EDIT: fixed.
Does this only show up when using custom event-emitter solutions?
@Fishrock123 You had to
pipeit after attaching the handler ;-)'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 :-)
- added a commit that references this issue
on Sep 3, 2015 Fixed in b513a33
@calvinmetcalf if you could confirm, that'd be 💯
- added 2 commits that reference this issue
on Sep 3, 2015 will look in the morning thanks!
👍
Metadata
Metadata
Assignees
Labels
streamIssues and PRs related to Node.js streams.Issues and PRs related to Node.js streams.
just noticed this when looking into upgrading readable stream to v3.3.0