Skip to content

Commit

Permalink
reuse_port: fixed "duplicate listen options" error
Browse files Browse the repository at this point in the history
  • Loading branch information
chobits committed Dec 5, 2016
1 parent f6e6f32 commit 28a6f96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/http/ngx_http_core_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -4340,9 +4340,10 @@ ngx_http_core_listen(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
ecf = ngx_event_get_conf(cf->cycle->conf_ctx, ngx_event_core_module);

if (ecf && ecf->reuse_port == 1) {

/* set cmcf->ports[].addrs[].lsopt.reuseport */

lsopt.reuseport = 1;
lsopt.set = 1;
lsopt.bind = 1;
}
}
}
Expand Down

0 comments on commit 28a6f96

Please sign in to comment.