X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=udp_send.c;h=533af63a271f190718c45d8073f988b7971bf338;hb=c1d6c466251d21d1fb7b513ba2297ebf94d44853;hp=4678e936d620da06d736e779eaff21f1c3383145;hpb=eecc102ad0abeb0335fe994bb72031a15b9090d7;p=paraslash.git diff --git a/udp_send.c b/udp_send.c index 4678e936..533af63a 100644 --- a/udp_send.c +++ b/udp_send.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005-2009 Andre Noll + * Copyright (C) 2005-2010 Andre Noll * * Licensed under the GPL v2. For licencing details see COPYING. */ @@ -237,6 +237,8 @@ static int udp_send_fec(char *buf, size_t len, void *private_data) if (ret < 0) goto fail; ret = send_queued_chunks(ut->fd, ut->cq, 0); + if (ret == -ERRNO_TO_PARA_ERROR(ECONNREFUSED)) + ret = 0; if (ret < 0) goto fail; if (!len) @@ -247,6 +249,8 @@ static int udp_send_fec(char *buf, size_t len, void *private_data) goto fail; } ret = write_nonblock(ut->fd, buf, len, 0); + if (ret == -ERRNO_TO_PARA_ERROR(ECONNREFUSED)) + ret = 0; if (ret < 0) goto fail; if (ret != len) {