Commit e51bcb25 authored by Fabrice Bellet's avatar Fabrice Bellet Committed by Olivier Crête
Browse files

conncheck: fix a buggy state transition

The previous patch handling tcp disconnections forgot a case when the
selected pair is removed, while in state ready, and in that situation,
we should not jump back to connecting state, but fail instead. Just like
we did at the beginning of the function.
parent 7ec7f66d
Pipeline #240356 passed with stages
in 18 minutes and 36 seconds
......@@ -4906,10 +4906,14 @@ conn_check_prune_socket (NiceAgent *agent, NiceStream *stream, NiceComponent *co
if (p_count == 0)
agent_signal_component_state_change (agent,
stream->id, component->id, NICE_COMPONENT_STATE_FAILED);
else if (p_nominated == 0 &&
component->state >= NICE_COMPONENT_STATE_CONNECTED)
agent_signal_component_state_change (agent,
stream->id, component->id, NICE_COMPONENT_STATE_CONNECTING);
else if (p_nominated == 0) {
if (component->state == NICE_COMPONENT_STATE_READY)
agent_signal_component_state_change (agent,
stream->id, component->id, NICE_COMPONENT_STATE_FAILED);
else if (component->state == NICE_COMPONENT_STATE_CONNECTED)
agent_signal_component_state_change (agent,
stream->id, component->id, NICE_COMPONENT_STATE_CONNECTING);
}
}
/* outside of the previous loop, because it may
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment