agent: Accept any transition back to the gathering state
authorOlivier Crête <olivier.crete@collabora.com>
Tue, 20 Jul 2021 17:04:17 +0000 (13:04 -0400)
committerOlivier Crête <olivier.crete@ocrete.ca>
Tue, 20 Jul 2021 22:46:37 +0000 (22:46 +0000)
When doing a ICE restart, which can be done from any state, we can
always go back into the gathering state.

This fixes a regression introduced by b20ac5ba7b731f2cc698f26e8def28a518de058e

agent/agent.c

index f65696b..261fe64 100644 (file)
@@ -2596,9 +2596,9 @@ void agent_signal_component_state_change (NiceAgent *agent, guint stream_id, gui
             /* If a tcp socket of connected pair is disconnected, in
              * conn_check_prune_socket(): */
             TRANSITION (CONNECTED, CONNECTING) ||
-            /* with ICE restart in nice_stream_restart() */
-            TRANSITION (CONNECTED, GATHERING) ||
-            TRANSITION (READY, GATHERING));
+            /* with ICE restart in nice_stream_restart(),
+             * it can always go back to gathering */
+            (new_state == NICE_COMPONENT_STATE_GATHERING));
 
 #undef TRANSITION