diff options
Diffstat (limited to 'pjlib/src/pj')
-rw-r--r-- | pjlib/src/pj/os_core_win32.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pjlib/src/pj/os_core_win32.c b/pjlib/src/pj/os_core_win32.c index 866afb99..30992a4f 100644 --- a/pjlib/src/pj/os_core_win32.c +++ b/pjlib/src/pj/os_core_win32.c @@ -559,6 +559,9 @@ PJ_DEF(pj_status_t) pj_thread_join(pj_thread_t *p) PJ_CHECK_STACK(); PJ_ASSERT_RETURN(p, PJ_EINVAL); + if (p == pj_thread_this()) + return PJ_ECANCELLED; + PJ_LOG(6, (pj_thread_this()->obj_name, "Joining thread %s", p->obj_name)); rc = WaitForSingleObject(rec->hthread, INFINITE); |