mirror of
https://github.com/nginx/nginx.git
synced 2024-12-28 09:51:04 -06:00
move listen log copying from ngx_open_listening_sockets()
to ngx_configure_listening_sockets(), otherwise listen socket logs have no file after first reload and this caused segfault if debug_connection was used; the bug has been introduced in r2786
This commit is contained in:
parent
00bd137064
commit
d4a71fb844
@ -202,8 +202,6 @@ ngx_open_listening_sockets(ngx_cycle_t *cycle)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
ls[i].log = *ls[i].logp;
|
|
||||||
|
|
||||||
if (ls[i].inherited) {
|
if (ls[i].inherited) {
|
||||||
|
|
||||||
/* TODO: close on exit */
|
/* TODO: close on exit */
|
||||||
@ -357,6 +355,8 @@ ngx_configure_listening_sockets(ngx_cycle_t *cycle)
|
|||||||
ls = cycle->listening.elts;
|
ls = cycle->listening.elts;
|
||||||
for (i = 0; i < cycle->listening.nelts; i++) {
|
for (i = 0; i < cycle->listening.nelts; i++) {
|
||||||
|
|
||||||
|
ls[i].log = *ls[i].logp;
|
||||||
|
|
||||||
if (ls[i].rcvbuf != -1) {
|
if (ls[i].rcvbuf != -1) {
|
||||||
if (setsockopt(ls[i].fd, SOL_SOCKET, SO_RCVBUF,
|
if (setsockopt(ls[i].fd, SOL_SOCKET, SO_RCVBUF,
|
||||||
(const void *) &ls[i].rcvbuf, sizeof(int))
|
(const void *) &ls[i].rcvbuf, sizeof(int))
|
||||||
|
Loading…
Reference in New Issue
Block a user