aboutsummaryrefslogtreecommitdiff
path: root/src/os/unix/ngx_pthread_thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix/ngx_pthread_thread.c')
-rw-r--r--src/os/unix/ngx_pthread_thread.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/os/unix/ngx_pthread_thread.c b/src/os/unix/ngx_pthread_thread.c
index d5d816f2e..621565621 100644
--- a/src/os/unix/ngx_pthread_thread.c
+++ b/src/os/unix/ngx_pthread_thread.c
@@ -146,6 +146,10 @@ ngx_int_t ngx_mutex_trylock(ngx_mutex_t *m)
err = pthread_mutex_trylock(&m->mutex);
+ if (err == NGX_EBUSY) {
+ return NGX_AGAIN;
+ }
+
if (err != 0) {
ngx_log_error(NGX_LOG_ALERT, m->log, err,
"pthread_mutex_trylock(" PTR_FMT ") failed", m);