-
Notifications
You must be signed in to change notification settings - Fork 181
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
Client doesn't reconnect after EOF #147
Comments
Sorry I was confused by the server implementation I was using... and by the default |
Despite other bugs distracting me, I believe this is still an issue (despite MaxElapsedTime=0), and I can reproduce it with a handwritten server which simply closes the response writer ( Perhaps the library's own server implementation doesn't ever do that... I want this to work with a server that does. (Really the main thing I want is to have a client that will reconnect (after backoff) on any error, or at least one that won't stop silently.) (Thanks for a great library) |
This is almost a duplicate of #75 depending if you treat the current behavior as a bug or a feature |
Thanks @pjcdawkins I got stuck on this but thankfully you had already figured it out. Hoping these will get merged, pulling your PRs in manually for now. |
Just a note that I ran into the same issue. |
sse/client.go
Line 217 in c6d5381
It seems on EOF, the error is ignored and the read loop silently finishes, without an error, so backoff.RetryNotify does not retry.
If this EOF check is removed (so
err
is returned unconditionally), the clientbehaves as I would expect: it reconnects after an EOF[edit: currently unsure about this].What is the intended/expected behavior here?
The text was updated successfully, but these errors were encountered: