From cb6e4528645361ea9c4c554250d74e86f0a88baf Mon Sep 17 00:00:00 2001 From: proddy Date: Tue, 9 Jun 2026 20:30:12 +0200 Subject: [PATCH] revert WiFi.disconnect --- src/core/network.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/network.cpp b/src/core/network.cpp index bf1ba7972..4a65837a3 100644 --- a/src/core/network.cpp +++ b/src/core/network.cpp @@ -82,7 +82,7 @@ void Network::begin() { WiFi.persistent(false); WiFi.setAutoReconnect(false); WiFi.mode(WIFI_STA); - WiFi.disconnect(true); // turn STA off; don't eraseap here (STA netif not started yet -> log_e, and persistent(false) means nothing is in NVS anyway) + WiFi.disconnect(true, true); // wipe old settings in NVS. Will give a warning on boot but can be ignored. WiFi.setScanMethod(WIFI_ALL_CHANNEL_SCAN); WiFi.setHostname(hostname_.c_str()); // updates shared default_hostname buffer WiFi.enableSTA(true); // creates the STA netif