summaryrefslogtreecommitdiffhomepage
path: root/src/os/unix/ngx_process_cycle.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix/ngx_process_cycle.c')
-rw-r--r--src/os/unix/ngx_process_cycle.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c
index 3d198be8a..4705f3951 100644
--- a/src/os/unix/ngx_process_cycle.c
+++ b/src/os/unix/ngx_process_cycle.c
@@ -1035,7 +1035,6 @@ static void
ngx_channel_handler(ngx_event_t *ev)
{
ngx_int_t n;
- ngx_socket_t fd;
ngx_channel_t ch;
ngx_connection_t *c;
@@ -1053,17 +1052,7 @@ ngx_channel_handler(ngx_event_t *ev)
ngx_log_debug1(NGX_LOG_DEBUG_CORE, ev->log, 0, "channel: %i", n);
if (n == NGX_ERROR) {
-
- ngx_free_connection(c);
-
- fd = c->fd;
- c->fd = (ngx_socket_t) -1;
-
- if (close(fd) == -1) {
- ngx_log_error(NGX_LOG_ALERT, ev->log, ngx_errno,
- "close() channel failed");
- }
-
+ ngx_close_connection(c);
return;
}