Skip to content

Commit

Permalink
Removed the delay added to client
Browse files Browse the repository at this point in the history
  • Loading branch information
jadhavrohit924 committed Jun 10, 2022
1 parent 451e1de commit 3d71a64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/platform/ESP32/NetworkCommissioningDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void ESPWiFiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * callbac
reinterpret_cast<const char *>(mStagingNetwork.credentials), mStagingNetwork.credentialsLen);

err = DeviceLayer::SystemLayer().StartTimer(
static_cast<System::Clock::Timeout>((kWiFiConnectNetworkTimeoutSeconds - kClientCommunicationDalay) * secToMiliSec),
static_cast<System::Clock::Timeout>(kWiFiConnectNetworkTimeoutSeconds * secToMiliSec),
OnConnectWiFiNetworkFailed, NULL);
mpConnectCallback = callback;
exit:
Expand Down
3 changes: 1 addition & 2 deletions src/platform/ESP32/NetworkCommissioningDriver.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<WiFiScanResponse>
Expand Down

0 comments on commit 3d71a64

Please sign in to comment.