Events: handle only active events in eventport.

We generate both read and write events if an error event was returned by
port_getn() without POLLIN/POLLOUT, but we should not try to handle inactive
events, they may even have no handler.
This commit is contained in:
Valentin Bartenev 2013-04-12 15:04:23 +00:00
parent ed9f87c901
commit c6aebf6c74

View File

@ -530,6 +530,14 @@ ngx_eventport_process_events(ngx_cycle_t *cycle, ngx_msec_t timer,
rev = c->read;
wev = c->write;
if (!rev->active) {
revents &= ~POLLIN;
}
if (!wew->active) {
revents &= ~POLLOUT;
}
rev->active = 0;
wev->active = 0;