From be410a39135d02a0e6cff4e2118bc94376a3e70c Mon Sep 17 00:00:00 2001 From: Kevin Hester Date: Mon, 24 May 2021 09:42:21 +0800 Subject: [PATCH] Fix #807 TCP API on ESP32. thanks @jfirwin your hint made the problem easy to find! --- geeksville-private/TODO.md | 2 +- src/mesh/wifi/WiFiServerAPI.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/geeksville-private/TODO.md b/geeksville-private/TODO.md index 3c0a5a1c8..01312d934 100644 --- a/geeksville-private/TODO.md +++ b/geeksville-private/TODO.md @@ -2,7 +2,7 @@ You probably don't care about this section - skip to the next one. -* investigate TCP on ESP32 https://github.com/meshtastic/Meshtastic-python/issues/90 +* DONE investigate TCP on ESP32 https://github.com/meshtastic/Meshtastic-device/issues/807 * fix python tool problem with windows and the heartbeat * router mode dropping messages? https://meshtastic.discourse.group/t/router-mode-missing-messages/3329/3 * fix ttgo eink screen diff --git a/src/mesh/wifi/WiFiServerAPI.h b/src/mesh/wifi/WiFiServerAPI.h index 96ff62999..c1f9b1be3 100644 --- a/src/mesh/wifi/WiFiServerAPI.h +++ b/src/mesh/wifi/WiFiServerAPI.h @@ -22,6 +22,9 @@ class WiFiServerAPI : public StreamAPI protected: + /// We override this method to prevent publishing EVENT_SERIAL_CONNECTED/DISCONNECTED for wifi links (we want the board to stay in the POWERED state to prevent disabling wifi) + virtual void onConnectionChanged(bool connected) {} + virtual int32_t runOnce(); // Check for dropped client connections /// Check the current underlying physical link to see if the client is currently connected