mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 21:27:21 +01:00
randomize reconnection delay when failed to establish connection
This commit is contained in:
parent
e36be97fdd
commit
4959633242
1 changed files with 1 additions and 1 deletions
|
|
@ -246,7 +246,7 @@ namespace MareSynchronos.WebAPI
|
|||
Logger.Warn(ex.StackTrace ?? string.Empty);
|
||||
Logger.Debug("Failed to establish connection, retrying");
|
||||
await StopAllConnections(token);
|
||||
await Task.Delay(TimeSpan.FromSeconds(5), token);
|
||||
await Task.Delay(TimeSpan.FromSeconds(new Random().Next(5, 20)), token);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue