MCPcopy Create free account
hub / github.com/FastLED/FastLED / onDisconnected

Method onDisconnected

src/fl/stl/asio/http/connection.cpp.hpp:74–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74void HttpConnection::onDisconnected() {
75 if (mState == ConnectionState::CONNECTED || mState == ConnectionState::CONNECTING) {
76 // Check if we should attempt reconnection
77 // Use <= to handle the exact limit correctly (0-indexed attempts vs 1-indexed limit)
78 if (mConfig.maxReconnectAttempts == 0 ||
79 mReconnectAttempts < mConfig.maxReconnectAttempts) {
80 transitionTo(ConnectionState::RECONNECTING, 0);
81 } else {
82 transitionTo(ConnectionState::DISCONNECTED, 0);
83 }
84 }
85}
86
87void HttpConnection::onError() {
88 // Treat errors the same as disconnection

Callers 13

disconnectMethod · 0.80
disconnectMethod · 0.80
checkHeartbeatTimeoutMethod · 0.80
processIncomingDataMethod · 0.80
connectMethod · 0.80
sendMethod · 0.80
recvMethod · 0.80
sendMethod · 0.80
recvMethod · 0.80
disconnectMethod · 0.80
FL_TEST_FILEFunction · 0.80
disconnectMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected