]> git.kaiwu.me - nginx.git/commitdiff
avoid segfault if poll is used and endless loop if select is used
authorIgor Sysoev <igor@sysoev.ru>
Tue, 16 Oct 2007 14:12:52 +0000 (14:12 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Tue, 16 Oct 2007 14:12:52 +0000 (14:12 +0000)
src/os/unix/ngx_process_cycle.c

index 3d198be8aa806bee068c793b1100e6093689bc73..f95d6e9a58b1697d43a8a795b7dbd7b0c145e564 100644 (file)
@@ -1054,7 +1054,7 @@ ngx_channel_handler(ngx_event_t *ev)
 
     if (n == NGX_ERROR) {
 
-        ngx_free_connection(c);
+        ngx_close_connection(c);
 
         fd = c->fd;
         c->fd = (ngx_socket_t) -1;