From: Jeff Trawick Date: Wed, 19 Sep 2001 18:47:31 +0000 (+0000) Subject: if we're gonna trash the connection due to a queue overflow, at the X-Git-Tag: 2.0.26~214 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=11ded9133086ef5caaddceb28fb3b97a3f3e267e;p=thirdparty%2Fapache%2Fhttpd.git if we're gonna trash the connection due to a queue overflow, at the 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 --- diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index 666d9449114..e2acea5e7e3 100644 --- a/server/mpm/worker/worker.c +++ b/server/mpm/worker/worker.c @@ -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 {