From: Chris Rienzo Date: Tue, 15 Dec 2015 19:42:48 +0000 (-0500) Subject: FS-8662 [mod_http_cache] don't block http_tryget while another thread is fetching... X-Git-Tag: v1.6.6~1^2~35^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=475df32a4b6e0ec141e920755e7074556eac3ccd;p=thirdparty%2Ffreeswitch.git FS-8662 [mod_http_cache] don't block http_tryget while another thread is fetching the URL --- diff --git a/src/mod/applications/mod_http_cache/mod_http_cache.c b/src/mod/applications/mod_http_cache/mod_http_cache.c index 60ed37dd25..30e588a102 100644 --- a/src/mod/applications/mod_http_cache/mod_http_cache.c +++ b/src/mod/applications/mod_http_cache/mod_http_cache.c @@ -675,7 +675,7 @@ static char *url_cache_get(url_cache_t *cache, http_profile_t *profile, switch_c switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Failed to download URL %s\n", url); cache->errors++; } - } else if (!u) { + } else if (!u || (u->status == CACHED_URL_RX_IN_PROGRESS && !download)) { filename = DOWNLOAD_NEEDED; } else { /* Wait until file is downloaded */