[nginx] svn commit: r5172 - trunk/src/event/modules
vbart at nginx.com
vbart at nginx.com
Fri Apr 12 15:04:24 UTC 2013
Author: vbart
Date: 2013-04-12 15:04:23 +0000 (Fri, 12 Apr 2013)
New Revision: 5172
URL: http://trac.nginx.org/nginx/changeset/5172/nginx
Log:
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.
Modified:
trunk/src/event/modules/ngx_eventport_module.c
Modified: trunk/src/event/modules/ngx_eventport_module.c
===================================================================
--- trunk/src/event/modules/ngx_eventport_module.c 2013-04-12 15:02:33 UTC (rev 5171)
+++ trunk/src/event/modules/ngx_eventport_module.c 2013-04-12 15:04:23 UTC (rev 5172)
@@ -530,6 +530,14 @@
rev = c->read;
wev = c->write;
+ if (!rev->active) {
+ revents &= ~POLLIN;
+ }
+
+ if (!wew->active) {
+ revents &= ~POLLOUT;
+ }
+
rev->active = 0;
wev->active = 0;
More information about the nginx-devel
mailing list