mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-31 15:44:21 +00:00
fix edge case endless loop that can get a channel stuck
This commit is contained in:
1 parent
cfa926d781
commit
19d49e2075
2 files changed
+7
-7
No files matched your search
@@ -1383,7 +1383,7 @@ SWITCH_DECLARE(void) switch_channel_wait_for_state(switch_channel_t *channel, sw
|
||||
switch_assert(channel);
|
||||
|
||||
for (;;) {
|
||||
if ((channel->state == channel->running_state && channel->running_state == want_state) ||
|
||||
if ((channel->state < CS_HANGUP && channel->state == channel->running_state && channel->running_state == want_state) ||
|
||||
(other_channel && switch_channel_down_nosig(other_channel)) || switch_channel_down_nosig(channel)) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user