mirror of
https://github.com/nginx/nginx.git
synced 2026-05-13 09:36:42 +00:00
Merge 284f55754e into 319b4ea63f
This commit is contained in:
commit
c2f63139d4
2 changed files with 10 additions and 0 deletions
|
|
@ -182,6 +182,11 @@ ngx_conf_split_clients_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
|
||||
for (i = 0; i < ctx->parts.nelts; i++) {
|
||||
sum = part[i].percent ? sum + part[i].percent : 10000;
|
||||
|
||||
if (sum == 10000) {
|
||||
part[i].percent = 0;
|
||||
}
|
||||
|
||||
if (sum > 10000) {
|
||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
||||
"percent total is greater than 100%%");
|
||||
|
|
|
|||
|
|
@ -180,6 +180,11 @@ ngx_conf_split_clients_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
|
||||
for (i = 0; i < ctx->parts.nelts; i++) {
|
||||
sum = part[i].percent ? sum + part[i].percent : 10000;
|
||||
|
||||
if (sum == 10000) {
|
||||
part[i].percent = 0;
|
||||
}
|
||||
|
||||
if (sum > 10000) {
|
||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
||||
"percent total is greater than 100%%");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue