diff options
Diffstat (limited to 'locks')
-rw-r--r-- | locks/win32/thread_cond.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/locks/win32/thread_cond.c b/locks/win32/thread_cond.c index 48465cbba..f99b25dd3 100644 --- a/locks/win32/thread_cond.c +++ b/locks/win32/thread_cond.c @@ -142,10 +142,11 @@ APR_DECLARE(apr_status_t) apr_thread_cond_timedwait(apr_thread_cond_t *cond, if (res != WAIT_OBJECT_0) { apr_status_t rv = apr_get_os_error(); ReleaseMutex(cond->mutex); + apr_thread_mutex_lock(mutex); if (res == WAIT_TIMEOUT) { - rv = APR_TIMEUP; + return APR_TIMEUP; } - return rv; + return apr_get_os_error(); } if (cond->signal_all) { if (cond->num_waiting == 0) { |