avoid segfault if poll is used and endless loop if select is used
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c
index 3d198be..f95d6e9 100644
--- a/src/os/unix/ngx_process_cycle.c
+++ b/src/os/unix/ngx_process_cycle.c
@@ -1054,7 +1054,7 @@
 
     if (n == NGX_ERROR) {
 
-        ngx_free_connection(c);
+        ngx_close_connection(c);
 
         fd = c->fd;
         c->fd = (ngx_socket_t) -1;