FastLED 3.10.8
Loading...
Searching...
No Matches

◆ calculateBackoffDelay()

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

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

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

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

Referenced by transitionTo().

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