Class DefaultRetryPolicy
public class DefaultRetryPolicy : IRetryPolicy
- Inheritance
-
objectDefaultRetryPolicy
- Implements
Constructors
DefaultRetryPolicy(TimeSpan[]?)
public DefaultRetryPolicy(TimeSpan[]? delays)
Parameters
delays
TimeSpan[]
Fields
LastDelay
public readonly TimeSpan? LastDelay
Field Value
Methods
NextRetryDelay(RetryContext)
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 TimeSpan? NextRetryDelay(RetryContext retryContext)
Parameters
retryContext
RetryContextInformation 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
- TimeSpan?
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.
Reset()
public void Reset()