Skip to content
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

[ch88739] Fix decoding of multiple events in a single chunk #6

Merged
merged 7 commits into from
Mar 8, 2021

Conversation

samstokes
Copy link
Contributor

Rewrite the SSE decoder again to fix a nasty bug that seemed to be occurring intermittently during IH tests (and in any case was reproducible). If two events occurred within a single chunk, we would drop one, which is unfortunate. This may have been introduced during the last rewrite (#3).

I also tried hard to simplify down the logic and remove some conditionals that didn't need to be there, so hopefully the result is a little more readable than what came before.

@samstokes samstokes requested review from hroederld and ezrast-ld March 6, 2021 01:30
@shortcut-integration
Copy link

This pull request has been linked to Clubhouse Story #88739: Rust SDK - get passing IH again with eventsource 0.4.0.

@samstokes samstokes merged commit f8b170a into master Mar 8, 2021
@samstokes samstokes deleted the samstokes/ch88739/fix-chunks-with-multi-events branch March 8, 2021 22:54
samstokes added a commit to mraerino/rust-eventsource-client that referenced this pull request May 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants