Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add max_conns to jdomain #84

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/ngx_http_upstream_jdomain_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#define NGX_JDOMAIN_ARG_STR_MAX_IPS "max_ips="
#define NGX_JDOMAIN_ARG_STR_PORT "port="
#define NGX_JDOMAIN_ARG_STR_IPVER "ipver="
#define NGX_JDOMAIN_ARG_STR_MAX_CONNS "max_conns="
#define NGX_JDOMAIN_ARG_STR_STRICT "strict"

typedef struct
Expand Down Expand Up @@ -603,6 +604,14 @@ ngx_http_upstream_jdomain(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
continue;
}

arglen = ngx_strlen(NGX_JDOMAIN_ARG_STR_MAX_CONNS);
if (ngx_strncmp(value[i].data, NGX_JDOMAIN_ARG_STR_MAX_CONNS, arglen) == 0) {
num = ngx_atoi(value[i].data + arglen, value[i].len - arglen);
server->max_conns = num;

continue;
}

goto invalid;
}

Expand Down
Loading