]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-8662 [mod_http_cache] don't block http_tryget while another thread is fetching...
authorChris Rienzo <chris.rienzo@citrix.com>
Tue, 15 Dec 2015 19:42:48 +0000 (14:42 -0500)
committerChris Rienzo <chris.rienzo@citrix.com>
Tue, 15 Dec 2015 19:43:06 +0000 (14:43 -0500)
src/mod/applications/mod_http_cache/mod_http_cache.c

index 60ed37dd2513b74f10e218d65609241aa1181fb0..30e588a102f80a9f4be4a7fe8b4e1337eca92f93 100644 (file)
@@ -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 */