mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
Mail: listen backlog=.
This commit is contained in:
parent
60c654ddf5
commit
c81d7ec158
@ -359,6 +359,8 @@ ngx_mail_optimize_servers(ngx_conf_t *cf, ngx_array_t *ports)
|
||||
ls->log.data = &ls->addr_text;
|
||||
ls->log.handler = ngx_accept_log_error;
|
||||
|
||||
ls->backlog = addr[i].opt.backlog;
|
||||
|
||||
ls->keepalive = addr[i].opt.so_keepalive;
|
||||
#if (NGX_HAVE_KEEPALIVE_TUNABLE)
|
||||
ls->keepidle = addr[i].opt.tcp_keepidle;
|
||||
|
@ -58,6 +58,7 @@ typedef struct {
|
||||
int tcp_keepintvl;
|
||||
int tcp_keepcnt;
|
||||
#endif
|
||||
int backlog;
|
||||
} ngx_mail_listen_t;
|
||||
|
||||
|
||||
|
@ -383,6 +383,7 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
ngx_memcpy(&ls->u.sockaddr, u.sockaddr, u.socklen);
|
||||
|
||||
ls->socklen = u.socklen;
|
||||
ls->backlog = NGX_LISTEN_BACKLOG;
|
||||
ls->wildcard = u.wildcard;
|
||||
ls->ctx = cf->ctx;
|
||||
|
||||
@ -418,6 +419,19 @@ ngx_mail_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ngx_strncmp(value[i].data, "backlog=", 8) == 0) {
|
||||
ls->backlog = ngx_atoi(value[i].data + 8, value[i].len - 8);
|
||||
ls->bind = 1;
|
||||
|
||||
if (ls->backlog == NGX_ERROR || ls->backlog == 0) {
|
||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
||||
"invalid backlog \"%V\"", &value[i]);
|
||||
return NGX_CONF_ERROR;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ngx_strncmp(value[i].data, "ipv6only=o", 10) == 0) {
|
||||
#if (NGX_HAVE_INET6 && defined IPV6_V6ONLY)
|
||||
struct sockaddr *sa;
|
||||
|
Loading…
Reference in New Issue
Block a user