mirror of
https://github.com/apache/httpd.git
synced 2025-07-23 01:08:51 +00:00
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
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ struct fd_queue_t
|
||||
unsigned int out;
|
||||
apr_thread_mutex_t *one_big_mutex;
|
||||
apr_thread_cond_t *not_empty;
|
||||
int terminated;
|
||||
volatile int terminated;
|
||||
};
|
||||
typedef struct fd_queue_t fd_queue_t;
|
||||
|
||||
|
Reference in New Issue
Block a user