From 11ded9133086ef5caaddceb28fb3b97a3f3e267e Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Wed, 19 Sep 2001 18:47:31 +0000 Subject: [PATCH] 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 --- server/mpm/worker/worker.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/server/mpm/worker/worker.c b/server/mpm/worker/worker.c index 666d944911..e2acea5e7e 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 { -- 2.50.1