diff --git a/src/ngx_http_vhost_traffic_status_module.h b/src/ngx_http_vhost_traffic_status_module.h index 58a8199..c38897e 100644 --- a/src/ngx_http_vhost_traffic_status_module.h +++ b/src/ngx_http_vhost_traffic_status_module.h @@ -16,7 +16,7 @@ #include "ngx_http_vhost_traffic_status_string.h" #include "ngx_http_vhost_traffic_status_node.h" -#define NGX_HTTP_VTS_MODULE_VERSION "0.1.19.dev.7c3ecb9" +#define NGX_HTTP_VTS_MODULE_VERSION "0.1.19.dev.c16aa0e" #define NGX_HTTP_VHOST_TRAFFIC_STATUS_UPSTREAM_NO 0 #define NGX_HTTP_VHOST_TRAFFIC_STATUS_UPSTREAM_UA 1 diff --git a/src/ngx_http_vhost_traffic_status_shm.c b/src/ngx_http_vhost_traffic_status_shm.c index d87336f..1e968e8 100644 --- a/src/ngx_http_vhost_traffic_status_shm.c +++ b/src/ngx_http_vhost_traffic_status_shm.c @@ -247,7 +247,7 @@ ngx_http_vhost_traffic_status_shm_add_node_cache(ngx_http_request_t *r, } if (init == NGX_HTTP_VHOST_TRAFFIC_STATUS_NODE_NONE) { - vtsn->stat_cache_max_size = (ngx_atomic_uint_t) (cache->max_size * cache->bsize); + vtsn->stat_cache_max_size = (ngx_atomic_uint_t) cache->shm_zone->shm.size; } else { ngx_shmtx_lock(&cache->shpool->mutex);