diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 2d0b55bb1b..eae77037e0 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -776,6 +776,8 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob } } + switch_mutex_lock(conference->mutex); + /* Close Unused Handles */ if (conference->fnode) { conference_file_node_t *fnode, *cur; @@ -804,6 +806,8 @@ void *SWITCH_THREAD_FUNC conference_thread_run(switch_thread_t *thread, void *ob switch_core_destroy_memory_pool(&pool); } + switch_mutex_unlock(conference->mutex); + /* Wait till everybody is out */ conference_utils_clear_flag_locked(conference, CFLAG_RUNNING); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Write Lock ON\n");