Notes on logging etc
[rsync/rsync.git] / io.c
diff --git a/io.c b/io.c
index 3c0b790..1d40649 100644 (file)
--- a/io.c
+++ b/io.c
@@ -454,8 +454,11 @@ static void writefd_unbuffered(int fd,char *buf,size_t len)
                        }
 
                        if (ret <= 0) {
-                               rprintf(FERROR,
-                                       "error writing %d unbuffered bytes"
+                               /* Don't try to write errors back
+                                * across the stream */
+                               io_multiplexing_close();
+                               rprintf(FERROR, RSYNC_NAME
+                                       ": error writing %d unbuffered bytes"
                                        " - exiting: %s\n", len,
                                        strerror(errno));
                                exit_cleanup(RERR_STREAMIO);