X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/89e540e638b29473118535cf9c93da2fc82a43db..d1b31da71e426ba7f636430d1764ae76858363d9:/io.c diff --git a/io.c b/io.c index bd1ce1ec..f3ea2a69 100644 --- a/io.c +++ b/io.c @@ -899,6 +899,13 @@ static void writefd_unbuffered(int fd,char *buf,size_t len) rsyserr(FERROR, errno, "writefd_unbuffered failed to write %ld bytes: phase \"%s\"", (long)len, io_write_phase); + /* If the other side is sending us error messages, try + * to grab any messages they sent before they died. */ + while (fd == sock_f_out && am_sender) { + io_timeout = 30; + readfd_unbuffered(sock_f_in, io_filesfrom_buf, + sizeof io_filesfrom_buf); + } exit_cleanup(RERR_STREAMIO); }