From ddf74e5f78693dcb386cb7ccb3e007cf014a3f48 Mon Sep 17 00:00:00 2001 From: AlexeyZavar Date: Thu, 16 Jan 2025 16:48:40 +0300 Subject: [PATCH] fix: don't crash if smth wrong when fetching devs and channels --- Telegram/SourceFiles/ayu/utils/rc_manager.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/ayu/utils/rc_manager.cpp b/Telegram/SourceFiles/ayu/utils/rc_manager.cpp index 827903114..2d392c975 100644 --- a/Telegram/SourceFiles/ayu/utils/rc_manager.cpp +++ b/Telegram/SourceFiles/ayu/utils/rc_manager.cpp @@ -70,7 +70,6 @@ void RCManager::gotResponse() { return; } - cSetLastUpdateCheck(base::unixtime::now()); const auto response = _reply->readAll(); clearSentRequest(); @@ -81,7 +80,12 @@ void RCManager::gotResponse() { } bool RCManager::handleResponse(const QByteArray &response) { - return applyResponse(response); + try { + return applyResponse(response); + } catch (...) { + LOG(("RCManager: Failed to apply response")); + return false; + } } bool RCManager::applyResponse(const QByteArray &response) {