struct
MQTT::Reconnect
- MQTT::Reconnect
- Struct
- Value
- Object
Overview
Controls how a client re-establishes a connection that dropped
unexpectedly. Delays back off exponentially and are capped at #max_delay.
Defined in:
mqtt/reconnect.crConstructors
Instance Method Summary
-
#delay_for(attempt : Int32) : Time::Span
attemptis 1 based - #give_up?(attempt : Int32) : Bool
- #initial_delay : Time::Span
-
#max_attempts : Int32 | Nil
nilretries forever - #max_delay : Time::Span
Constructor Detail
def self.new(initial_delay : Time::Span = 1.second, max_delay : Time::Span = 30.seconds, max_attempts : Int32 | Nil = nil)
#