mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-13 13:04:16 +01:00
add some connectivity changes
This commit is contained in:
parent
2307b43c65
commit
e36be97fdd
2 changed files with 3 additions and 3 deletions
|
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue