NinjaScript > Language Reference > Strategy >


Print this Topic Previous pageReturn to chapter overviewNext page


The strategy will only restart off a reestablished connection when there have been fewer restart attempts than MaxRestartAttempts in the last MaxRestartMinutes 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 MaxRestartAttempts for a strategy to be restarted when a connection is reestablished.







protected override void Initialize()

    // Allow for restarting the strategy only if there were less restart attempts than MaxRestartAttempts

    // within the last 5 minutes
    MaxRestartMinutes = 5;