You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 28, 2018. It is now read-only.
If passing an already ended stream to es.concat / es.merge, it won't work unless an "end" event is manually provoked for that stream.
A possible fix would be to check if there is a "ended" property in the stream object and increment the counter during stream registration:
es.merge = function (/streams.../) {
var toMerge = [].slice.call(arguments)
var stream = new Stream()
var endCount = 0
stream.writable = stream.readable = true
There is no standand way to indicate that a stream has already ended, so it's unlikely this patch would work in general.
How are you getting streams that have already ended?
prehaps there is another approach to your problem.
can you explain/post code that shows what you are trying to do?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
If passing an already ended stream to es.concat / es.merge, it won't work unless an "end" event is manually provoked for that stream.
A possible fix would be to check if there is a "ended" property in the stream object and increment the counter during stream registration:
es.merge = function (/streams.../) {
var toMerge = [].slice.call(arguments)
var stream = new Stream()
var endCount = 0
stream.writable = stream.readable = true
toMerge.forEach(function (e) {
})
stream.write = function (data) {
this.emit('data', data)
}
stream.destroy = function () {
merge.forEach(function (e) {
if(e.destroy) e.destroy()
})
}
return stream
}
The text was updated successfully, but these errors were encountered: