mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-24 19:52:35 +00:00
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_core_session_t *member_session = switch_core_session_locate(m->member_session_uuid);
|
||||||
switch_channel_t *member_channel = NULL;
|
switch_channel_t *member_channel = NULL;
|
||||||
|
|
||||||
switch_mutex_lock(globals.mutex);
|
|
||||||
globals.threads++;
|
|
||||||
switch_mutex_unlock(globals.mutex);
|
|
||||||
|
|
||||||
if (member_session) {
|
if (member_session) {
|
||||||
member_channel = switch_core_session_get_channel(member_session);
|
member_channel = switch_core_session_get_channel(member_session);
|
||||||
} else {
|
} else {
|
||||||
@ -2216,6 +2212,10 @@ void *SWITCH_THREAD_FUNC cc_member_thread_run(switch_thread_t *thread, void *obj
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
switch_mutex_lock(globals.mutex);
|
||||||
|
globals.threads++;
|
||||||
|
switch_mutex_unlock(globals.mutex);
|
||||||
|
|
||||||
while(switch_channel_ready(member_channel) && m->running && globals.running) {
|
while(switch_channel_ready(member_channel) && m->running && globals.running) {
|
||||||
cc_queue_t *queue = NULL;
|
cc_queue_t *queue = NULL;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user