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

Use copied fields to avoid byte slice was reused. #82

Merged
merged 1 commit into from
Aug 19, 2020

Conversation

tigerlee
Copy link
Contributor

When I use the latest version(v2.2.0), I got an issue in heavy network I/O.

I'm using sse as client, when I send an event stream request to server with header Last-Event-ID: 0, server sends lots of events to client, then I found some message's fields, such as ID & Event, was not the original value.

This might be caused by a byte slice was a reference, not a value.

So I use a copied value to these fields (ID, Event, Retry) to avoid this situation.

@purehyperbole
Copy link
Member

Hi there,

Thanks for the contribution. I'll merge this now and release!

@purehyperbole purehyperbole merged commit 1491ab5 into r3labs:master Aug 19, 2020
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.

None yet

2 participants