tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
InfiniteThirtySecondMaxRetryPolicy.cs
Go to the documentation of this file.
1using System;
2
3using Microsoft.AspNetCore.SignalR.Client;
4
6{
11 {
13 public TimeSpan? NextRetryDelay(RetryContext retryContext)
14 {
15 if (retryContext == null)
16 throw new ArgumentNullException(nameof(retryContext));
17
18 return TimeSpan.FromSeconds(Math.Min(Math.Pow(2, retryContext.PreviousRetryCount), 30));
19 }
20 }
21}
A IRetryPolicy that returns seconds in powers of 2, maxing out at 30s.