]> git.sesse.net Git - cubemap/blobdiff - input.cpp
Support deserialization of most state (curl input is not really good yet).
[cubemap] / input.cpp
index 48465664b56bf7429f1023d44a4ec9d9b7b81f30..541b5df6273bf7e59b0230acbcb1d936f679b977 100644 (file)
--- a/input.cpp
+++ b/input.cpp
@@ -67,8 +67,10 @@ void Input::do_work()
                curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &Input::curl_callback_thunk);
                curl_easy_setopt(curl, CURLOPT_WRITEDATA, this);
                curl_easy_perform(curl);
                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);
+               if (!should_stop) {
+                       printf("Transfer ended, waiting 0.2 seconds and restarting...\n");
+                       usleep(200000);
+               }
        }
 }
 
        }
 }