From fd671d3289feca3d64c51fa2f34b1c09361da063 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 20 Sep 2021 20:28:42 +0200 Subject: [PATCH 1/1] upd sender: Don't send FEC EOF from command handler context. Without this, the EOF packet might be sent twice: once by the command handler which stopped the stream and once by the server process. This does not hurt, but results in additional unnecessary network traffic, so return early from udp_close_target() when we're running in command handler context. --- udp_send.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/udp_send.c b/udp_send.c index 04e2982f..96a25d37 100644 --- a/udp_send.c +++ b/udp_send.c @@ -56,6 +56,8 @@ static void udp_close_target(struct sender_client *sc) size_t len; struct udp_target *ut = sc->private_data; + if (process_is_command_handler()) + return; if (ut->sent_fec_eof) return; PARA_NOTICE_LOG("sending FEC EOF\n"); -- 2.39.2