From 28bec347ef6f9d6603adf46cc68fc1e34c77d911 Mon Sep 17 00:00:00 2001 From: "michal.budzon" Date: Wed, 17 Nov 2021 13:01:59 +0100 Subject: [PATCH] Add default timeout to fix KVS error when fetching ExtendedTimoutConfig --- examples/platform/qpg/app/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/platform/qpg/app/main.cpp b/examples/platform/qpg/app/main.cpp index ce22bfc5c6e7df..4f465da9e53f5b 100644 --- a/examples/platform/qpg/app/main.cpp +++ b/examples/platform/qpg/app/main.cpp @@ -46,6 +46,10 @@ using namespace ::chip::Inet; using namespace ::chip::DeviceLayer; using namespace ::chip::DeviceLayer::Internal; +namespace { +constexpr int extDiscTimeoutSecs = 20; +} + /***************************************************************************** * Macro Definitions *****************************************************************************/ @@ -122,6 +126,10 @@ CHIP_ERROR CHIP_Init(void) } #endif // CHIP_ENABLE_OPENTHREAD +#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY + chip::app::MdnsServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); +#endif + ChipLogProgress(NotSpecified, "Starting Platform Manager Event Loop"); ret = PlatformMgr().StartEventLoopTask(); if (ret != CHIP_NO_ERROR)