DefaultReconnectPolicy

class DefaultReconnectPolicy(val retryDelays: List<Duration> = DEFAULT_RETRY_DELAYS, val maxReconnectionTimeout: Duration = DEFAULT_MAX_RECONNECTION_TIMEOUT) : ReconnectPolicy

A reconnect policy that takes in a list of delays to iterate through.

Constructors

Link copied to clipboard
constructor(retryDelays: List<Duration> = DEFAULT_RETRY_DELAYS, maxReconnectionTimeout: Duration = DEFAULT_MAX_RECONNECTION_TIMEOUT)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The max total time to try reconnecting. Defaults to 60 seconds.

Link copied to clipboard

The list of delays to use. If the number of retries exceeds the size of the list, reconnection is cancelled.

Functions

Link copied to clipboard
open override fun getNextRetryDelay(context: ReconnectContext): Duration?

Called after a disconnect is detected, and between each reconnect attempt.