esp_matter: Fix thread unsafe usage when rebooting a provisioned Thread device

This commit is contained in:
WanqQixiang
2025-05-07 11:06:47 +08:00
committed by Wang Qixiang
parent 37e32e3049
commit ae8ca4a264
+3 -1
View File
@@ -900,7 +900,9 @@ esp_err_t start(event_callback_t callback, intptr_t callback_arg)
// If Thread is Provisioned, publish the dns service
if (chip::DeviceLayer::ConnectivityMgr().IsThreadProvisioned() &&
(chip::Server::GetInstance().GetFabricTable().FabricCount() != 0)) {
chip::app::DnssdServer::Instance().StartServer();
PlatformMgr().ScheduleWork([](intptr_t){ chip::app::DnssdServer::Instance().StartServer(); },
reinterpret_cast<intptr_t>(nullptr));
}
#endif // CONFIG_ESP_MATTER_ENABLE_OPENTHREAD
#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD