Commit b20ac5ba authored by Fabrice Bellet's avatar Fabrice Bellet Committed by Olivier Crête

agent: transition to state gathering when restarting ice

The state of the component is downgraded to gathering state, so it can
really restart a new conncheck from scratch. It'll transition to state
connecting when receiving the updated remote candidates.
parent b7086dd9
......@@ -2599,7 +2599,10 @@ void agent_signal_component_state_change (NiceAgent *agent, guint stream_id, gui
TRANSITION (DISCONNECTED, CONNECTING) ||
/* If a tcp socket of connected pair is disconnected, in
* conn_check_prune_socket(): */
TRANSITION (CONNECTED, CONNECTING));
TRANSITION (CONNECTED, CONNECTING) ||
/* with ICE restart in nice_stream_restart() */
TRANSITION (CONNECTED, GATHERING) ||
TRANSITION (READY, GATHERING));
#undef TRANSITION
......@@ -5562,8 +5565,8 @@ nice_agent_restart_stream (
goto done;
}
/* step: reset local credentials for the stream and
* clean up the list of remote candidates */
/* step: reset local credentials for the stream,
* clean up the list of candidates, and the conncheck list */
nice_stream_restart (stream, agent);
res = TRUE;
......
......@@ -139,6 +139,8 @@ nice_stream_restart (NiceStream *stream, NiceAgent *agent)
NiceComponent *component = i->data;
nice_component_restart (component);
agent_signal_component_state_change (agent,
stream->id, component->id, NICE_COMPONENT_STATE_GATHERING);
}
}
......
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