add some connectivity changes
This commit is contained in:
@@ -288,12 +288,12 @@ namespace MareSynchronos.WebAPI
|
|||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Task ConnectionHubOnReconnected(string? arg)
|
private async Task ConnectionHubOnReconnected(string? arg)
|
||||||
{
|
{
|
||||||
Logger.Debug("Connection restored");
|
Logger.Debug("Connection restored");
|
||||||
|
await Task.Delay(TimeSpan.FromSeconds(new Random().Next(5, 10)));
|
||||||
_connectionDto = _connectionHub!.InvokeAsync<ConnectionDto>(ConnectionHubAPI.InvokeHeartbeat, _dalamudUtil.PlayerNameHashed).Result;
|
_connectionDto = _connectionHub!.InvokeAsync<ConnectionDto>(ConnectionHubAPI.InvokeHeartbeat, _dalamudUtil.PlayerNameHashed).Result;
|
||||||
Connected?.Invoke();
|
Connected?.Invoke();
|
||||||
return Task.CompletedTask;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Task ConnectionHubOnReconnecting(Exception? arg)
|
private Task ConnectionHubOnReconnecting(Exception? arg)
|
||||||
|
|||||||
@@ -7,6 +7,6 @@ public class ForeverRetryPolicy : IRetryPolicy
|
|||||||
{
|
{
|
||||||
public TimeSpan? NextRetryDelay(RetryContext retryContext)
|
public TimeSpan? NextRetryDelay(RetryContext retryContext)
|
||||||
{
|
{
|
||||||
return TimeSpan.FromSeconds(5);
|
return TimeSpan.FromSeconds(new Random().Next(5, 20));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user