forked from xiaozhi/xiaozhi-esp32
add network error callback
This commit is contained in:
@@ -284,6 +284,9 @@ void Application::Start() {
|
||||
#else
|
||||
protocol_ = new MqttProtocol();
|
||||
#endif
|
||||
protocol_->OnNetworkError([this](const std::string& message) {
|
||||
Alert("Error", std::move(message));
|
||||
});
|
||||
protocol_->OnIncomingAudio([this](const std::string& data) {
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
audio_decode_queue_.emplace_back(std::move(data));
|
||||
|
||||
Reference in New Issue
Block a user