concat stream not emitting "end" event
- Dominant language
- JavaScript
- Stars
- 3.4k
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Description
I might be missing something but I'm trying a simple stream concat of 2 streams,
and noticed that while each stream emits the "end" event, the concat result doesn't.
Reproduction Steps:
``` js
var highland = require("highland");
(function() {
s1 = highland(['1', '2', '3']), s2 = highland(['4', '5', '6']), s3 = s1.concat(s2);
const log = s => process.stdout.write(` [${s}] `);
s1.on('end', function() { log('s1 ended') });
s2.on('end', function() { log('s2 ended') });
s3.on('end', function() { log('s3 ended') });
s3.map(n => `[${n}]`).pipe(process.stdout);
})();
```
Outputs:
`[1][2][3] [s1 ended] [4][5][6] [s2 ended] undefined`
Expected:
`[s3 ended]` to print to console too.
ps: I noticed that if I add another transform at the end ( `s4 = s3.map(....); s4.on('end', ...)`), that stream does emit "end".
Contributor guide
Assessment
This issue has not been assessed yet.