IRetryPolicy.NextRetryDelay(RetryContext) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
If passed to WithAutomaticReconnect(IHubConnectionBuilder, IRetryPolicy), this will be called after the transport loses a connection to determine if and for how long to wait before the next reconnect attempt.
public:
Nullable<TimeSpan> NextRetryDelay(Microsoft::AspNetCore::SignalR::Client::RetryContext ^ retryContext);
public TimeSpan? NextRetryDelay (Microsoft.AspNetCore.SignalR.Client.RetryContext retryContext);
abstract member NextRetryDelay : Microsoft.AspNetCore.SignalR.Client.RetryContext -> Nullable<TimeSpan>
Public Function NextRetryDelay (retryContext As RetryContext) As Nullable(Of TimeSpan)
Parameters
- retryContext
- RetryContext
Information related to the next possible reconnect attempt including the number of consecutive failed retries so far, time spent reconnecting so far and the error that lead to this reconnect attempt.
Returns
A TimeSpan representing the amount of time to wait from now before starting the next reconnect attempt.
null
tells the client to stop retrying and close.