RestartsWithinMinutes

View as Markdown

Definition

Determines within how many minutes the strategy will attempt to restart. The strategy will only restart off a reestablished connection when there have been fewer restart attempts than NumberRestartAttempts in the last NumberRestartAttempts time span. The purpose of these settings is to stop the strategy should your connection be unstable and incapable of maintaining a consistent connected state.

Property Value

An int value representing the maximum number of minutes in the time span in which restart attempts have to be less than NumberRestartAttempts for a strategy to be restarted when a connection is reestablished. Default value is set to 5.

Syntax

RestartsWithinMinutes

Examples

1protected override void OnStateChange()
2{
3 if (State == State.SetDefaults)
4 {
5 /*Allow for restarting the strategy only if there were less restart attempts than
6 MaxRestartAttempts within the last 5 minutes*/
7 RestartsWithinMinutes = 5;
8 }
9}