FastLED 3.9.15
Loading...
Searching...
No Matches

◆ calculateBackoffDelay()

u32 fl::HttpConnection::calculateBackoffDelay ( ) const
private

Definition at line 213 of file connection.cpp.hpp.

213 {
214 // Exponential backoff: delay = initial * (multiplier ^ attempts)
215 u32 delay = mConfig.reconnectInitialDelayMs;
216 for (u32 i = 0; i < mReconnectAttempts; i++) {
217 delay *= mConfig.reconnectBackoffMultiplier;
218 if (delay > mConfig.reconnectMaxDelayMs) {
219 delay = mConfig.reconnectMaxDelayMs;
220 break;
221 }
222 }
223
224 return delay;
225}
ConnectionConfig mConfig
Definition connection.h:74
void delay(u32 ms, bool run_async=true) FL_NOEXCEPT
Public delay wrapper that keeps bare Arduino delay() preferred after using fl::delay; while still all...
Definition delay.h:98

References fl::delay(), mConfig, and mReconnectAttempts.

Referenced by transitionTo().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: