Mercurial > hg > nginx
comparison src/os/unix/ngx_process_cycle.c @ 1575:08998303f3d6
avoid segfault if poll is used and endless loop if select is used
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 16 Oct 2007 14:12:52 +0000 |
parents | 4c43e25d11ea |
children | 8009c3ad39a9 |
comparison
equal
deleted
inserted
replaced
1574:6a60502db714 | 1575:08998303f3d6 |
---|---|
1052 | 1052 |
1053 ngx_log_debug1(NGX_LOG_DEBUG_CORE, ev->log, 0, "channel: %i", n); | 1053 ngx_log_debug1(NGX_LOG_DEBUG_CORE, ev->log, 0, "channel: %i", n); |
1054 | 1054 |
1055 if (n == NGX_ERROR) { | 1055 if (n == NGX_ERROR) { |
1056 | 1056 |
1057 ngx_free_connection(c); | 1057 ngx_close_connection(c); |
1058 | 1058 |
1059 fd = c->fd; | 1059 fd = c->fd; |
1060 c->fd = (ngx_socket_t) -1; | 1060 c->fd = (ngx_socket_t) -1; |
1061 | 1061 |
1062 if (close(fd) == -1) { | 1062 if (close(fd) == -1) { |