Skip to content

Commit

Permalink
Merge pull request #84 from X4BNet/feature/max_conns
Browse files Browse the repository at this point in the history
add max_conns to jdomain
  • Loading branch information
nicholaschiasson authored Jan 24, 2024
2 parents 4e9e2a4 + c369247 commit 801406f
Showing 1 changed file with 9 additions and 0 deletions.
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

0 comments on commit 801406f

Please sign in to comment.