Wait a bit more between attempts to connect to aria2c rpc.

This commit is contained in:
Matthieu Gautier 2018-11-12 15:08:28 +01:00
parent 84e831eae9
commit 94a053e821
1 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ Aria2::Aria2():
m_secret = "token:"+m_secret; m_secret = "token:"+m_secret;
std::string aria2cmd = appendToDirectory( std::string aria2cmd = appendToDirectory(
removeLastPathElement(getExecutablePath()), removeLastPathElement(getExecutablePath(), true, true),
ARIA2_CMD); ARIA2_CMD);
if (fileExists(aria2cmd)) { if (fileExists(aria2cmd)) {
// A local aria2c exe exists (packaged with kiwix-desktop), use it. // A local aria2c exe exists (packaged with kiwix-desktop), use it.
@ -81,7 +81,7 @@ Aria2::Aria2():
int watchdog = 50; int watchdog = 50;
while(--watchdog) { 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); auto res = curl_easy_perform(mp_curl);
if (res == CURLE_OK) { if (res == CURLE_OK) {
break; break;