]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
if we're gonna trash the connection due to a queue overflow, at the
authorJeff Trawick <trawick@apache.org>
Wed, 19 Sep 2001 18:47:31 +0000 (18:47 +0000)
committerJeff Trawick <trawick@apache.org>
Wed, 19 Sep 2001 18:47:31 +0000 (18:47 +0000)
very least we should close the socket and write a log message (mostly
to aid debugging, as this is a showstopper problem)

this is no fix; there is a design issue to consider; hopefully this
will

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91089 13f79535-47bb-0310-9956-ffa450edef68

server/mpm/worker/worker.c

index 666d9449114c65098b62f42d94980dec1d57e57f..e2acea5e7e3e7a5e0fffb83b786ac40b3baf34d3 100644 (file)
@@ -659,7 +659,16 @@ static void *listener_thread(apr_thread_t *thd, void * dummy)
                 signal_workers();
             }
             if (csd != NULL) {
-                ap_queue_push(worker_queue, csd, ptrans);
+                rv = ap_queue_push(worker_queue, csd, ptrans);
+                if (rv) {
+                    /* trash the connection; we couldn't queue the connected
+                     * socket to a worker 
+                     */
+                    apr_socket_close(csd);
+                    ap_log_error(APLOG_MARK, APLOG_CRIT, 0, ap_server_conf,
+                                 "ap_queue_push failed with error code %d",
+                                 rv);
+                }
             }
         }
         else {