]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - udp_send.c
udp_send_fec(): Treat ECONNREFUSED like EAGAIN.
[paraslash.git] / udp_send.c
index efe80b6d68f931d4608106c629540fc7eff0d607..533af63a271f190718c45d8073f988b7971bf338 100644 (file)
@@ -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) {