udp sender: Send EOF package only once.
[paraslash.git] / udp_send.c
index 425118a135edfee7224f40256dc087a803115aaf..2eb33b537606725dd71f1ddc4bb531814c659c7d 100644 (file)
@@ -64,8 +64,9 @@ static void udp_close_target(struct sender_client *sc)
        PARA_NOTICE_LOG("sending FEC EOF\n");
        len = vss_get_fec_eof_packet(&buf);
        /* Ignore write() errors since we are closing the target anyway. */
-       if (write(sc->fd, buf, len) == len)
-               ut->sent_fec_eof = true;
+       if (write(sc->fd, buf, len))
+               do_nothing; /* avoid "ignoring return value" warning */
+       ut->sent_fec_eof = true;
 }
 
 static void udp_delete_target(struct sender_client *sc, const char *msg)