diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-01-08 11:31:50 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-01-08 11:31:50 +0000 |
commit | 0008ebe2a381574ded201e5527c1b0f73b6e2b7a (patch) | |
tree | 918d397dd249e15399d90319fa9b0f73ead87a43 /src | |
parent | f53c2a00f87e6c7600e79776d3e2c16b4c3b452e (diff) | |
download | nginx-0008ebe2a381574ded201e5527c1b0f73b6e2b7a.tar.gz nginx-0008ebe2a381574ded201e5527c1b0f73b6e2b7a.zip |
workaround for Linux 2.6 OpenVZ
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ngx_connection.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c index af2f25cd8..e0a6ba23a 100644 --- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c @@ -537,13 +537,21 @@ ngx_close_listening_sockets(ngx_cycle_t *cycle) c = ls[i].connection; - if (ngx_event_flags & NGX_USE_RTSIG_EVENT) { - if (c->read->active) { + if (c->read->active) { + if (ngx_event_flags & NGX_USE_RTSIG_EVENT) { ngx_del_conn(c, NGX_CLOSE_EVENT); - } - } else { - if (c->read->active) { + } else if (ngx_event_flags & NGX_USE_EPOLL_EVENT) { + + /* + * it seems that Linux-2.6.x OpenVZ sends events + * for closed shared listening sockets unless + * the events was explicity deleted + */ + + ngx_del_event(c->read, NGX_READ_EVENT, 0); + + } else { ngx_del_event(c->read, NGX_READ_EVENT, NGX_CLOSE_EVENT); } } |