mirror of https://github.com/kiwix/libkiwix.git
Revert Do not use this_thread::sleep.
We already have a custom sleep method.
This commit is contained in:
parent
f93c31754a
commit
0b2c9fa7ce
|
@ -3,7 +3,8 @@
|
|||
#include "aria2.h"
|
||||
#include "xmlrpc.h"
|
||||
#include <sstream>
|
||||
#include <time.h>
|
||||
#include <thread>
|
||||
#include <chrono>
|
||||
#include <tools/otherTools.h>
|
||||
#include <tools/pathTools.h>
|
||||
#include <downloader.h> // For AriaError
|
||||
|
@ -81,8 +82,7 @@ Aria2::Aria2():
|
|||
|
||||
int watchdog = 50;
|
||||
while(--watchdog) {
|
||||
struct timespec wait = {0, 10000000};
|
||||
nanosleep(&wait, nullptr);
|
||||
sleep(10);
|
||||
auto res = curl_easy_perform(mp_curl);
|
||||
if (res == CURLE_OK) {
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue