tgstation-server
6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
src
Tgstation.Server.Client
InfiniteThirtySecondMaxRetryPolicy.cs
Go to the documentation of this file.
1
using
System;
2
3
using
Microsoft.AspNetCore.SignalR.Client;
4
5
namespace
Tgstation.Server.Client
6
{
10
sealed
class
InfiniteThirtySecondMaxRetryPolicy
:
IRetryPolicy
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
}
IRetryPolicy
Tgstation.Server.Client.InfiniteThirtySecondMaxRetryPolicy
A IRetryPolicy that returns seconds in powers of 2, maxing out at 30s.
Definition
InfiniteThirtySecondMaxRetryPolicy.cs:11
Tgstation.Server.Client.InfiniteThirtySecondMaxRetryPolicy.NextRetryDelay
TimeSpan? NextRetryDelay(RetryContext retryContext)
Definition
InfiniteThirtySecondMaxRetryPolicy.cs:13
Tgstation.Server.Client
Definition
AuthenticatedGraphQLServerClient.cs:12
Generated by
1.9.8