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

◆ onConnected()

void fl::HttpConnection::onConnected ( u32 currentTimeMs = 0)

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

57 {
59 // Reset attempts if we were in RECONNECTING state before entering CONNECTING
60 // This detects successful reconnection after disconnect
61 bool shouldResetAttempts = mWasReconnecting || (mState == ConnectionState::RECONNECTING);
62
64
65 if (shouldResetAttempts) {
66 resetReconnectAttempts(); // Successful reconnection, reset counter
67 } else {
68 resetReconnectState(); // Initial connection, just reset timing
69 }
70
71 mWasReconnecting = false;
72 }
73}
void resetReconnectAttempts() FL_NO_EXCEPT
void transitionTo(ConnectionState newState, u32 currentTimeMs) FL_NO_EXCEPT
void resetReconnectState() FL_NO_EXCEPT
ConnectionState mState
Definition connection.h:76

References fl::CONNECTED, fl::CONNECTING, fl::FL_NO_EXCEPT, mState, mWasReconnecting, fl::RECONNECTING, resetReconnectAttempts(), resetReconnectState(), and transitionTo().

Referenced by onEvent().

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