mirror of
https://github.com/nginx/nginx.git
synced 2024-12-19 13:43:28 -06:00
Core: allow shared memory size to be declared after a reference.
For example, this fixes the case when "proxy_cache_path" is specified after "proxy_cache" that references it.
This commit is contained in:
parent
c799c82faa
commit
06ff117986
@ -1207,6 +1207,10 @@ ngx_shared_memory_add(ngx_conf_t *cf, ngx_str_t *name, size_t size, void *tag)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (shm_zone[i].shm.size == 0) {
|
||||
shm_zone[i].shm.size = size;
|
||||
}
|
||||
|
||||
if (size && size != shm_zone[i].shm.size) {
|
||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
||||
"the size %uz of shared memory zone \"%V\" "
|
||||
|
Loading…
Reference in New Issue
Block a user