upd sender: Don't send FEC EOF from command handler context.
[paraslash.git] / udp_send.c
index 52947b20610a6b26280755cf0ddb5125ac5ae8a2..96a25d370a99d3fdcb6782ef9451ae86b1cfc3a4 100644 (file)
 #include "error.h"
 #include "string.h"
 #include "afh.h"
+#include "net.h"
 #include "server.h"
 #include "list.h"
 #include "send.h"
 #include "sched.h"
 #include "vss.h"
 #include "portable_io.h"
-#include "net.h"
 #include "fd.h"
 #include "close_on_fork.h"
 
@@ -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");