From 94a053e8218111be0ee1c5e135db2508665a1000 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Mon, 12 Nov 2018 15:08:28 +0100 Subject: [PATCH] Wait a bit more between attempts to connect to aria2c rpc. --- src/aria2.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aria2.cpp b/src/aria2.cpp index 854a73b9e..c19cabe4b 100644 --- a/src/aria2.cpp +++ b/src/aria2.cpp @@ -44,7 +44,7 @@ Aria2::Aria2(): m_secret = "token:"+m_secret; std::string aria2cmd = appendToDirectory( - removeLastPathElement(getExecutablePath()), + removeLastPathElement(getExecutablePath(), true, true), ARIA2_CMD); if (fileExists(aria2cmd)) { // A local aria2c exe exists (packaged with kiwix-desktop), use it. @@ -81,7 +81,7 @@ Aria2::Aria2(): int watchdog = 50; while(--watchdog) { - std::this_thread::sleep_for(std::chrono::microseconds(100)); + std::this_thread::sleep_for(std::chrono::microseconds(10000)); auto res = curl_easy_perform(mp_curl); if (res == CURLE_OK) { break;