We already have the per target ->sent_fec_eof flag, but we only set it
after the EOF packet was sent *successfully*. It's pointless to send
the packet more than once, so this patch modifies udp_close_target() to
set the flag regardless of whether the write(2) call succeeded.
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)