From 769e68841320e1ac51cccb8919f3974642af5b42 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Sat, 4 Feb 2023 16:08:08 +0300 Subject: [PATCH] UI: RpcManager: Try to wait server response several times --- src/ui/rpc/rpcmanager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ui/rpc/rpcmanager.cpp b/src/ui/rpc/rpcmanager.cpp index d365481a..5efa74c1 100644 --- a/src/ui/rpc/rpcmanager.cpp +++ b/src/ui/rpc/rpcmanager.cpp @@ -419,8 +419,9 @@ bool RpcManager::waitResult() { m_resultCommand = Control::CommandNone; + int waitCount = 2; do { - if (!client()->waitForRead()) + if (!client()->waitForRead() && --waitCount <= 0) return false; } while (m_resultCommand == Control::CommandNone);