-
Notifications
You must be signed in to change notification settings - Fork 28
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
Fix stop_on_end = true
closing underlying stream
#178
Conversation
Is "done" exposed at all via a public API or was that always internal state? We may want to check dependencies as well and possibly consider a major version change. |
The main change is the effect of EDIT: I reverted the below change to avoid affecting current uses of `TOKEN_END`.
|
I reverted the changes to the behavior of This makes it hard to make multiple empty data chunks in a row, but there aren't many uses for that functionality. |
Fixes #85 #95 #117 #128
This PR ensures the underlying stream is not closed if
stop_on_end = true
is used.This PR removes the done mode added in #177. With this PR when a
stop_on_end = true
stream reaches the end of a data chunk while writing, instead of going into stop or done mode the stream will restart the codec and concatenate the next data chunk, like it would ifstop_on_end = false
. After writing,stop_on_end = true
only prevents the underlying stream from being closed.These changes might be slightly breaking but only affect streams created with
stop_on_end = true
and in write mode.