Skip to content

Commit

Permalink
fix stuck connection
Browse files Browse the repository at this point in the history
  • Loading branch information
bertmelis committed May 29, 2024
1 parent 7c2f4bb commit 70d3113
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/MqttClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ void MqttClient::loop() {
_parser.reset();
_lastClientActivity = _lastServerActivity = millis();
_setState(State::connectingMqtt);
} else if (_transport->disconnected()) { // sync: implemented as "not connected"; async: depending on state of pcb in underlying lib
_setState(State::disconnectingTcp1);
_disconnectReason = DisconnectReason::TCP_DISCONNECTED;
}
break;
case State::connectingMqtt:
Expand Down

0 comments on commit 70d3113

Please sign in to comment.