diff --git a/src/platform/ESP32/NetworkCommissioningDriver.cpp b/src/platform/ESP32/NetworkCommissioningDriver.cpp index 7347b768f9137e..609740340a6661 100644 --- a/src/platform/ESP32/NetworkCommissioningDriver.cpp +++ b/src/platform/ESP32/NetworkCommissioningDriver.cpp @@ -217,7 +217,7 @@ void ESPWiFiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * callbac reinterpret_cast(mStagingNetwork.credentials), mStagingNetwork.credentialsLen); err = DeviceLayer::SystemLayer().StartTimer( - static_cast((kWiFiConnectNetworkTimeoutSeconds - kClientCommunicationDalay) * secToMiliSec), + static_cast(kWiFiConnectNetworkTimeoutSeconds * secToMiliSec), OnConnectWiFiNetworkFailed, NULL); mpConnectCallback = callback; exit: diff --git a/src/platform/ESP32/NetworkCommissioningDriver.h b/src/platform/ESP32/NetworkCommissioningDriver.h index c19215730506d5..fd3f1ddaa2ed64 100644 --- a/src/platform/ESP32/NetworkCommissioningDriver.h +++ b/src/platform/ESP32/NetworkCommissioningDriver.h @@ -25,8 +25,7 @@ namespace NetworkCommissioning { namespace { constexpr uint8_t kMaxWiFiNetworks = 1; constexpr uint8_t kWiFiScanNetworksTimeOutSeconds = 10; -constexpr uint8_t kClientCommunicationDalay = 10; -constexpr uint8_t kWiFiConnectNetworkTimeoutSeconds = 30 + kClientCommunicationDalay; +constexpr uint8_t kWiFiConnectNetworkTimeoutSeconds = 30; } // namespace class ESPScanResponseIterator : public Iterator