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

◆ onConnected()

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

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

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

References fl::CONNECTED, fl::CONNECTING, 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: