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:
|
else if (result.IsRetryField) |
|
{ |
|
if (long.TryParse(result.GetValueAsString(), out var retry)) |
|
{ |
|
_retryDelay = TimeSpan.FromMilliseconds(retry); |
|
} |
|
} |
But _retryDelay is not really used for the reconnection time:
|
private async Task MaybeWaitWithBackOff() { |
|
if (_retryDelay.TotalMilliseconds > 0) |
|
{ |
|
TimeSpan sleepTime = _backOff.GetNextBackOff(); |
|
if (sleepTime.TotalMilliseconds > 0) { |
|
_logger.Info("Waiting {0} milliseconds before reconnecting...", sleepTime.TotalMilliseconds); |
|
BackOffDelay = sleepTime; |
|
await Task.Delay(sleepTime); |
|
} |
|
} |
|
} |
Instead it is only passed initially for construction of ExponentialBackoffWithDecorrelation:
|
_backOff = new ExponentialBackoffWithDecorrelation(_retryDelay, _configuration.MaxRetryDelay); |
The _minimumDelay in ExponentialBackoffWithDecorrelation is never updated
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
_retryDelayis 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
_minimumDelayinExponentialBackoffWithDecorrelationis never updated