MQTT会话超时与网络错误处理

This commit is contained in:
Terrence
2025-03-04 05:32:11 +08:00
parent c60f134093
commit 5a71e1bdd6
6 changed files with 52 additions and 30 deletions

View File

@@ -302,12 +302,12 @@ void Application::StartListening() {
}
void Application::StopListening() {
if (device_state_ == kDeviceStateListening) {
Schedule([this]() {
Schedule([this]() {
if (device_state_ == kDeviceStateListening) {
protocol_->SendStopListening();
SetDeviceState(kDeviceStateIdle);
});
}
}
});
}
void Application::Start() {