提交 b1cf5bee authored 作者: Anthony Minessale's avatar Anthony Minessale

wait for thread to start in mod conference to avoid one in a million race on heavy traffic

上级 665f7656
...@@ -2496,6 +2496,7 @@ static void conference_loop_output(conference_member_t *member) ...@@ -2496,6 +2496,7 @@ static void conference_loop_output(conference_member_t *member)
uint32_t low_count, bytes; uint32_t low_count, bytes;
call_list_t *call_list, *cp; call_list_t *call_list, *cp;
switch_codec_implementation_t read_impl = { 0 }; switch_codec_implementation_t read_impl = { 0 };
int sanity;
switch_core_session_get_read_impl(member->session, &read_impl); switch_core_session_get_read_impl(member->session, &read_impl);
...@@ -2596,6 +2597,13 @@ static void conference_loop_output(conference_member_t *member) ...@@ -2596,6 +2597,13 @@ static void conference_loop_output(conference_member_t *member)
switch_channel_answer(channel); switch_channel_answer(channel);
} }
sanity = 2000;
while(!switch_test_flag(member, MFLAG_ITHREAD) && sanity > 0) {
switch_cond_next();
sanity--;
}
/* Fair WARNING, If you expect the caller to hear anything or for digit handling to be processed, */ /* Fair WARNING, If you expect the caller to hear anything or for digit handling to be processed, */
/* you better not block this thread loop for more than the duration of member->conference->timer_name! */ /* you better not block this thread loop for more than the duration of member->conference->timer_name! */
while (switch_test_flag(member, MFLAG_RUNNING) && switch_test_flag(member, MFLAG_ITHREAD) while (switch_test_flag(member, MFLAG_RUNNING) && switch_test_flag(member, MFLAG_ITHREAD)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论