From: Andre Noll Date: Mon, 20 Sep 2021 18:28:42 +0000 (+0200) Subject: upd sender: Don't send FEC EOF from command handler context. X-Git-Tag: v0.6.4~14 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=fd671d3289feca3d64c51fa2f34b1c09361da063;hp=4793e8dd226b49ea0b931504c84f21449ab8f704 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. --- 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");