diff --git a/WiFiManager.cpp b/WiFiManager.cpp index ec235e8e6..2e7884d3d 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -308,11 +308,13 @@ int WiFiManager::connectWifi(String ssid, String pass) { DEBUG_WM ("Connection result: "); DEBUG_WM ( connRes ); //not connected, WPS enabled, no pass - first attempt + #ifdef NO_EXTRA_4K_HEAP if (_tryWPS && connRes != WL_CONNECTED && pass == "") { startWPS(); //should be connected at the end of WPS connRes = waitForConnectResult(); } + #endif return connRes; }