Fix broken httpfetch due to SimpleThread removal
authorsapier <Sapier at GMX dot net>
Mon, 16 Dec 2013 22:31:56 +0000 (23:31 +0100)
committersapier <Sapier at GMX dot net>
Mon, 16 Dec 2013 22:31:56 +0000 (23:31 +0100)
src/httpfetch.cpp

index 6c073c8e62d3ae3245b30672f1ac2290f92df0d7..b48d00764d736cfa4833647cd247badc4bd89264 100644 (file)
@@ -539,6 +539,7 @@ protected:
 
        void * Thread()
        {
+               ThreadStarted();
                log_register_thread("CurlFetchThread");
                DSTACK(__FUNCTION_NAME);
 
@@ -651,6 +652,8 @@ void httpfetch_cleanup()
 void httpfetch_async(const HTTPFetchRequest &fetchrequest)
 {
        g_httpfetch_thread->requestFetch(fetchrequest);
+       if (!g_httpfetch_thread->IsRunning())
+               g_httpfetch_thread->Start();
 }
 
 static void httpfetch_request_clear(unsigned long caller)