Skip to content

Commit ee61971

Browse files
author
logwang
committed
Nginx: fix that worker may crash when reload or recv signals.
1 parent b37139c commit ee61971

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

app/nginx-1.11.10/src/event/modules/ngx_ff_channel.c

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ static void * ngx_ff_channel_create_conf(ngx_cycle_t *cycle);
3737
static char * ngx_ff_channel_init_conf(ngx_cycle_t *cycle,
3838
void *conf);
3939
static ngx_int_t ngx_ff_epoll_init(ngx_cycle_t *cycle);
40-
static void ngx_ff_epoll_done(ngx_cycle_t *cycle);
4140
static ngx_int_t ngx_ff_epoll_add_event(ngx_event_t *ev,
4241
ngx_int_t event, ngx_uint_t flags);
4342
static ngx_int_t ngx_ff_epoll_del_event(ngx_event_t *ev,
@@ -95,7 +94,7 @@ ngx_module_t ngx_ff_channel_module = {
9594
ngx_ff_epoll_init, /* init process */
9695
NULL, /* init thread */
9796
NULL, /* exit thread */
98-
ngx_ff_epoll_done, /* exit process */
97+
NULL, /* exit process */
9998
NULL, /* exit master */
10099
NGX_MODULE_V1_PADDING
101100
};
@@ -148,29 +147,6 @@ ngx_ff_epoll_init(ngx_cycle_t *cycle)
148147
return NGX_OK;
149148
}
150149

151-
static void
152-
ngx_ff_epoll_done(ngx_cycle_t *cycle)
153-
{
154-
if (ep != -1) {
155-
if (close(ep) == -1) {
156-
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
157-
"epoll close() failed");
158-
}
159-
ep = -1;
160-
}
161-
162-
if (event_list) {
163-
ngx_free(event_list);
164-
event_list = NULL;
165-
}
166-
167-
nevents = 0;
168-
169-
if (channel_connection) {
170-
ngx_ff_delete_connection();
171-
}
172-
}
173-
174150
static ngx_int_t
175151
ngx_ff_epoll_add_event(ngx_event_t *ev, ngx_int_t event,
176152
ngx_uint_t flags)

0 commit comments

Comments
 (0)