mod_callcenter: Possible fix on unload module freeze when an member uuid changed or is gone
This commit is contained in:
parent
dad670713b
commit
ac619fd0e8
|
@ -2205,10 +2205,6 @@ void *SWITCH_THREAD_FUNC cc_member_thread_run(switch_thread_t *thread, void *obj
|
|||
switch_core_session_t *member_session = switch_core_session_locate(m->member_session_uuid);
|
||||
switch_channel_t *member_channel = NULL;
|
||||
|
||||
switch_mutex_lock(globals.mutex);
|
||||
globals.threads++;
|
||||
switch_mutex_unlock(globals.mutex);
|
||||
|
||||
if (member_session) {
|
||||
member_channel = switch_core_session_get_channel(member_session);
|
||||
} else {
|
||||
|
@ -2216,6 +2212,10 @@ void *SWITCH_THREAD_FUNC cc_member_thread_run(switch_thread_t *thread, void *obj
|
|||
return NULL;
|
||||
}
|
||||
|
||||
switch_mutex_lock(globals.mutex);
|
||||
globals.threads++;
|
||||
switch_mutex_unlock(globals.mutex);
|
||||
|
||||
while(switch_channel_ready(member_channel) && m->running && globals.running) {
|
||||
cc_queue_t *queue = NULL;
|
||||
|
||||
|
|
Loading…
Reference in New Issue