From fc0be99221cebaec33835cd4aec84b1049a42855 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Wed, 29 Aug 2007 07:18:54 +0000 Subject: [PATCH] disable pair event on POLLREMOVE --- src/event/modules/ngx_devpoll_module.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/event/modules/ngx_devpoll_module.c b/src/event/modules/ngx_devpoll_module.c index be523add9..48815b4ec 100644 --- a/src/event/modules/ngx_devpoll_module.c +++ b/src/event/modules/ngx_devpoll_module.c @@ -255,6 +255,12 @@ ngx_devpoll_del_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags) ev->active = 0; if (flags & NGX_CLOSE_EVENT) { + e = (event == POLLIN) ? c->write : c->read; + + if (e) { + e->active = 0; + } + return NGX_OK; }