mirror of
https://github.com/nginx/nginx.git
synced 2024-12-20 06:03:31 -06:00
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:
parent
ed9f87c901
commit
c6aebf6c74
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user