Mercurial > hg > nginx
comparison src/event/modules/ngx_eventport_module.c @ 5171:98cbd8f92c87
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.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Fri, 12 Apr 2013 15:04:23 +0000 |
parents | 6362bd26e4b0 |
children | a4d21534cbf4 |
comparison
equal
deleted
inserted
replaced
5170:6362bd26e4b0 | 5171:98cbd8f92c87 |
---|---|
528 | 528 |
529 c = ev->data; | 529 c = ev->data; |
530 rev = c->read; | 530 rev = c->read; |
531 wev = c->write; | 531 wev = c->write; |
532 | 532 |
533 if (!rev->active) { | |
534 revents &= ~POLLIN; | |
535 } | |
536 | |
537 if (!wew->active) { | |
538 revents &= ~POLLOUT; | |
539 } | |
540 | |
533 rev->active = 0; | 541 rev->active = 0; |
534 wev->active = 0; | 542 wev->active = 0; |
535 | 543 |
536 if (revents & POLLIN) { | 544 if (revents & POLLIN) { |
537 | 545 |