httpc: fix the hc == NULL condition in the http_client_thread()

This commit is contained in:
Jaroslav Kysela 2014-06-28 22:11:42 +02:00
parent f4d7d5fa8e
commit d924c84202

View file

@ -1152,12 +1152,14 @@ http_client_thread ( void *p )
TAILQ_FOREACH(hc, &http_clients, hc_link)
if (hc == ev.data.ptr)
break;
if (hc == NULL || hc->hc_shutdown_wait) {
if (hc->hc_shutdown_wait) {
pthread_cond_broadcast(&http_cond);
/* Disable the poll looping for this moment */
http_client_poll_dir(hc, 0, 0);
}
if (hc == NULL) {
pthread_mutex_unlock(&http_lock);
continue;
}
if (hc->hc_shutdown_wait) {
pthread_cond_broadcast(&http_cond);
/* Disable the poll looping for this moment */
http_client_poll_dir(hc, 0, 0);
pthread_mutex_unlock(&http_lock);
continue;
}