Skip to content

Instantly share code, notes, and snippets.

@sapier
Created December 16, 2013 22:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sapier/7995540 to your computer and use it in GitHub Desktop.
Save sapier/7995540 to your computer and use it in GitHub Desktop.
diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp
index 12e203e..a0dae80 100644
--- a/src/httpfetch.cpp
+++ b/src/httpfetch.cpp
@@ -539,6 +539,7 @@ class CurlFetchThread : public JThread
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment