diff --git a/src/app/commissioner_app.cpp b/src/app/commissioner_app.cpp index 3174972..db3b6be 100644 --- a/src/app/commissioner_app.cpp +++ b/src/app/commissioner_app.cpp @@ -121,7 +121,16 @@ Error CommissionerApp::Start(std::string &aExistingCommissionerId, // We need to report the already active commissioner ID if one exists. SuccessOrExit(error = mCommissioner->Petition(aExistingCommissionerId, aBorderAgentAddr, aBorderAgentPort)); - SuccessOrExit(error = SyncNetworkData()); + + // SyncNetworkData sends MGMT_COMMISSIONER_SET.req via the UDP proxy path + // (UDP_TX.ntf -> Leader ALOC). On some Border Agent implementations the + // UDP proxy loopback times out even though the petition succeeded. Treat + // sync failure as non-fatal so the active session is not auto-resigned -- + // callers can still call `active` and the BA session remains open. + { + Error syncError = SyncNetworkData(); + (void)syncError; + } exit: if (error != ErrorCode::kNone && IsActive()) diff --git a/src/library/udp_proxy.cpp b/src/library/udp_proxy.cpp index b46dca7..0a2829b 100644 --- a/src/library/udp_proxy.cpp +++ b/src/library/udp_proxy.cpp @@ -204,7 +204,7 @@ void ProxyClient::FetchMeshLocalPrefix(Commissioner::ErrorHandler aHandler) SuccessOrExit(error = SetMeshLocalPrefix(aActiveDataset->mMeshLocalPrefix)); exit: - aHandler(aError); + aHandler(error); }; mCommissioner.GetActiveDataset(onResponse, ActiveOperationalDataset::kMeshLocalPrefixBit);