summaryrefslogtreecommitdiffstats
path: root/server/mpm_fdqueue.c
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2021-07-22 17:48:03 +0200
committerYann Ylavic <ylavic@apache.org>2021-07-22 17:48:03 +0200
commitcb17448b566ce7b806ac65f3554d4ed4380ade69 (patch)
tree3ebf2caeaa39fc2d384fd428099f42eabde54dc9 /server/mpm_fdqueue.c
parentcore: don't close the socket when failing in ap_start_lingering_close(). (diff)
downloadapache2-cb17448b566ce7b806ac65f3554d4ed4380ade69.tar.xz
apache2-cb17448b566ce7b806ac65f3554d4ed4380ade69.zip
mpm_fdqueue: return EOF for ap_queue_interrupt_*() when terminated.
* server/mpm_fdqueue.c (queue_interrupt): noop and return APR_EOF when queue is terminated already. * server/mpm_fdqueue.h (struct fd_queue_t): make "terminated" volatile. Follow up to r1891716. Github: closes #208 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1891724 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/mpm_fdqueue.c')
-rw-r--r--server/mpm_fdqueue.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/mpm_fdqueue.c b/server/mpm_fdqueue.c
index c81245078a..3697ca722f 100644
--- a/server/mpm_fdqueue.c
+++ b/server/mpm_fdqueue.c
@@ -493,6 +493,10 @@ static apr_status_t queue_interrupt(fd_queue_t *queue, int all, int term)
{
apr_status_t rv;
+ if (queue->terminated) {
+ return APR_EOF;
+ }
+
if ((rv = apr_thread_mutex_lock(queue->one_big_mutex)) != APR_SUCCESS) {
return rv;
}