Highland.js v2.8.1 Release Notes
-
🛠 Bugfix
- The
Readable
stream wrapper changes from2.8.0
assumed thatclose
would never be emitted beforeend
for any stream. This is not the case forSockets
, which willclose
when the client disconnects but willend
only when it has piped all of its data. For a slow consumer,end
may happen afterclose
, causing the Highland stream to drop all data afterclose
is emitted.
This release fixes the regression at the cost of restoring the old behavior of never ending the Stream when only
close
is emitted. This does not affect the case whereerror
events are emitted withoutend
. That still works fine. To manually end a stream when it emitsclose
, listen to the event and callstream.end()
. Fixes #490. - The