]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
iptv: http_client_simple_reconnect() must be protected by the mutex lock, fixes ...
authorJaroslav Kysela <perex@perex.cz>
Wed, 7 Dec 2016 09:46:35 +0000 (10:46 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 7 Dec 2016 09:46:35 +0000 (10:46 +0100)
src/input/mpegts/iptv/iptv_http.c

index e05cd45f54a02d79e7b5eaf5082ee136cfcc596a..cdb188b9b6c5d701b115ad40b480215910de8799 100644 (file)
@@ -361,8 +361,10 @@ iptv_http_reconnect ( http_client_t *hc, const char *url )
 
   urlinit(&u);
   if (!urlparse(url, &u)) {
+    pthread_mutex_lock(&hc->hc_mutex);
     hc->hc_keepalive = 0;
     r = http_client_simple_reconnect(hc, &u, HTTP_VERSION_1_1);
+    pthread_mutex_unlock(&hc->hc_mutex);
     if (r < 0)
       tvherror(LS_IPTV, "cannot reopen http client: %d'", r);
   } else {