Class: ExponentialReconnectionPolicy

policies/reconnection~ ExponentialReconnectionPolicy

Constructor

new ExponentialReconnectionPolicy(baseDelay, maxDelay, startWithNoDelay)

A reconnection policy that waits exponentially longer between each reconnection attempt (but keeps a constant delay once a maximum delay is reached).
Parameters:
Name Type Description
baseDelay Number Delay in ms that
maxDelay Number the maximum delay in ms to wait between two reconnection attempt
startWithNoDelay Boolean Determines if the first attempt should be zero delay

Methods

newSchedule() → {Object}

A new schedule that uses an exponentially growing delay between reconnection attempts.
Returns:
An infinite iterator
Type
Object