[vlc-devel] [PATCH] amt: move timer disarm before 'continue'
Natalie Landsberg
natalie.landsberg97 at gmail.com
Wed Oct 28 20:13:55 CET 2020
Addresses bug #25228. Streams would time out at 4:04 because the update timer would be disarmed
and never rearmed again.
Move vlc_timer_disarm above 'continue' on line 742 so that the timer is still stopped before
trying the next server, but is instead after confirming whether a UDP packet can be
received.
---
modules/access/amt.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/modules/access/amt.c b/modules/access/amt.c
index 52bf0271ef..bc58bc971f 100644
--- a/modules/access/amt.c
+++ b/modules/access/amt.c
@@ -728,10 +728,6 @@ static bool open_amt_tunnel( stream_t *p_access )
msg_Dbg( p_access, "Joined ASM group" );
}
- /* If started, the timer must be stopped before trying the next server
- * in order to avoid data-race with sys->sAMT. */
- vlc_timer_disarm( sys->updateTimer );
-
amt_send_mem_update( p_access, sys->relayDisco, false );
bool eof=false;
block_t *pkt;
@@ -740,6 +736,9 @@ static bool open_amt_tunnel( stream_t *p_access )
if ( !(pkt = BlockAMT( p_access, &eof )) )
{
msg_Err( p_access, "Unable to receive UDP packet from AMT relay %s for multicast group", relay_ip );
+ /* If started, the timer must be stopped before trying the next server
+ * in order to avoid data-race with sys->sAMT. */
+ vlc_timer_disarm( sys->updateTimer );
continue;
}
else
--
2.24.3 (Apple Git-128)
More information about the vlc-devel
mailing list