Fix for rsync server processes hanging around after the client
[rsync/rsync.git] / io.c
diff --git a/io.c b/io.c
index 3c0b790..eeb3a56 100644 (file)
--- a/io.c
+++ b/io.c
@@ -454,6 +454,9 @@ static void writefd_unbuffered(int fd,char *buf,size_t len)
                        }
 
                        if (ret <= 0) {
+                               /* Don't try to write errors back
+                                * across the stream */
+                               io_multiplexing_close();
                                rprintf(FERROR,
                                        "error writing %d unbuffered bytes"
                                        " - exiting: %s\n", len,