Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Wippersnapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2664,7 +2664,8 @@ bool Wippersnapper::publish(const char *topic, uint8_t *payload, uint16_t bLen,
WS_DEBUG_PRINTLN(WS._mqtt->connected());
WS_DEBUG_PRINT("Network status: ");
WS_DEBUG_PRINTLN(networkStatus());
if (WS._mqtt->connected() && networkStatus() == WS_NET_CONNECTED) {
WS_DEBUG_PRINTLN("IF:");
if (WS._mqtt->connected() && (networkStatus() == WS_NET_CONNECTED)) {
WS_DEBUG_PRINTLN("Failed to publish MQTT message, retrying!");
} else {
WS_DEBUG_PRINTLN("MQTT connection broken! Running network FSM then publish...");
Expand Down
3 changes: 2 additions & 1 deletion src/network_interfaces/Wippersnapper_ESP32.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ class Wippersnapper_ESP32 : public Wippersnapper {
@return ws_status_t
*/
/********************************************************/
ws_status_t networkStatus() {
ws_status_t networkStatus() override {
WS_DEBUG_PRINTLN("ESP NetStatus");
switch (WiFi.status()) {
case WL_CONNECTED:
return WS_NET_CONNECTED;
Expand Down
Loading