mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-22 09:37:04 +00:00
[mod_http_cache] fix race cond at shutdown
This commit is contained in:
parent
2767527c67
commit
763230cc09
@ -781,7 +781,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, "Waiting for URL %s to be available\n", url);
|
||||
u->waiters++;
|
||||
url_cache_unlock(cache, session);
|
||||
while(u->status == CACHED_URL_RX_IN_PROGRESS && switch_time_now() < (u->download_time + download_timeout_ns)) {
|
||||
while(!gcache.shutdown && u->status == CACHED_URL_RX_IN_PROGRESS && switch_time_now() < (u->download_time + download_timeout_ns)) {
|
||||
switch_sleep(10 * 1000); /* 10 ms */
|
||||
}
|
||||
url_cache_lock(cache, session);
|
||||
|
Loading…
x
Reference in New Issue
Block a user