From 4933008f5d057eddcc0dc9772f46b32b67c91767 Mon Sep 17 00:00:00 2001
From: Andre Noll <maan@systemlinux.org>
Date: Sun, 23 May 2010 18:58:22 +0200
Subject: [PATCH] udp_send: Do not send the current chunk if queue is not
 empty.

In this case we have enqueued other data _and_ the current chunk already.
---
 udp_send.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/udp_send.c b/udp_send.c
index 70373c99..49f84acd 100644
--- a/udp_send.c
+++ b/udp_send.c
@@ -263,6 +263,7 @@ static int udp_send_fec(struct sender_client *sc, char *buf, size_t len)
 	if (!ret) { /* still data left in the queue */
 		ret = cq_force_enqueue(sc->cq, buf, len);
 		assert(ret >= 0);
+		return 0;
 	}
 	ret = write_nonblock(sc->fd, buf, len);
 	if (ret == -ERRNO_TO_PARA_ERROR(ECONNREFUSED))
-- 
2.39.5