This commit is contained in:
Sergey Kandaurov 2026-05-12 20:46:16 +02:00 committed by GitHub
commit c2f63139d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -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%%");

View file

@ -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%%");