httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r789067 - /httpd/httpd/trunk/server/mpm/simple/simple_io.c
Date Sun, 28 Jun 2009 08:18:37 GMT
Author: pquerna
Date: Sun Jun 28 08:18:37 2009
New Revision: 789067

URL: http://svn.apache.org/viewvc?rev=789067&view=rev
Log:
Only remove sockets from the pollcb when they have events being polled for.

Modified:
    httpd/httpd/trunk/server/mpm/simple/simple_io.c

Modified: httpd/httpd/trunk/server/mpm/simple/simple_io.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/simple/simple_io.c?rev=789067&r1=789066&r2=789067&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/simple/simple_io.c (original)
+++ httpd/httpd/trunk/server/mpm/simple/simple_io.c Sun Jun 28 08:18:37 2009
@@ -64,14 +64,16 @@
 
     while (!c->aborted) {
 
-        cs->pfd.reqevents = APR_POLLOUT | APR_POLLHUP | APR_POLLERR | APR_POLLIN;
-        rv = apr_pollcb_remove(sc->pollcb, &cs->pfd);
-        if (rv) {
-            ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
-                         "process_socket: apr_pollcb_remove failure");
-            /*AP_DEBUG_ASSERT(rv == APR_SUCCESS);*/
+        if (cs->pfd.reqevents != 0) {
+            rv = apr_pollcb_remove(sc->pollcb, &cs->pfd);
+            if (rv) {
+                ap_log_error(APLOG_MARK, APLOG_ERR, rv, ap_server_conf,
+                             "simple_io_process: apr_pollcb_remove failure");
+                /*AP_DEBUG_ASSERT(rv == APR_SUCCESS);*/
+            }
+            cs->pfd.reqevents = 0;
         }
-        
+
         if (cs->state == CONN_STATE_READ_REQUEST_LINE) {
             if (!c->aborted) {
                 ap_run_process_connection(c);



Mime
View raw message