-
Notifications
You must be signed in to change notification settings - Fork 16
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
Retry field not used correctly #92
Comments
Having the SSE retry field combined with the "ExponentialBackOffWithDecorrelation", it is hard to tell what the expected behaviour is. If the server sends a retry duration I would expect that the reconnect time is never less then the received retry duration. Even better: if there was a retry duration received from the server do not use the exponential back off strategy. Instead just use the retry time received from the sse server. |
It does look like the current logic is incorrect, but I would have to think more on what the most logical behavior would be, because we can't look to the SSE specification in this case; the spec does not say anything at all about backoff/jitter, so it has no opinion on whether or not that should be applied to a server-sent retry value. |
I am skeptical about entirely turning off the backoff/jitter behavior in this scenario. That would mean that any server that ever sends a |
Good point! A simple solution for me would be to just recreate the I think it could be as easy as adding dotnet-eventsource/src/LaunchDarkly.EventSource/EventSource.cs Lines 408 to 414 in ee3c875
The behaviour if the new minimum exceeds the old maximum also seems to be reasonable. |
Yes, that's what I was thinking too. I think this was just an oversight. We're in process of writing a new 6.0 version of (However, please note that the way the |
Even though the retry field is read it seems like it is not really used for the reconnection time.
Here the field is read to
_retryDelay
:dotnet-eventsource/src/LaunchDarkly.EventSource/EventSource.cs
Lines 408 to 414 in ee3c875
But
_retryDelay
is not really used for the reconnection time:dotnet-eventsource/src/LaunchDarkly.EventSource/EventSource.cs
Lines 201 to 211 in ee3c875
Instead it is only passed initially for construction of
ExponentialBackoffWithDecorrelation
:dotnet-eventsource/src/LaunchDarkly.EventSource/EventSource.cs
Line 99 in ee3c875
The
_minimumDelay
inExponentialBackoffWithDecorrelation
is never updatedThe text was updated successfully, but these errors were encountered: