- curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
- curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &Input::curl_callback_thunk);
- curl_easy_setopt(curl, CURLOPT_WRITEDATA, this);
- curl_easy_perform(curl);
+
+ while (!should_stop) {
+ curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &Input::curl_callback_thunk);
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, this);
+ curl_easy_perform(curl);
+ printf("Transfer ended, waiting 0.2 seconds and restarting...\n");
+ usleep(200000);
+ }