diff options
| author | Wayne Davison <wayned@samba.org> | 2004-07-29 07:09:46 +0000 |
|---|---|---|
| committer | Wayne Davison <wayned@samba.org> | 2004-07-29 07:09:46 +0000 |
| commit | d1b31da71e426ba7f636430d1764ae76858363d9 (patch) | |
| tree | 7bee479e93c42d07755e5467cdf11963a5f33eca /io.c | |
| parent | 89e540e638b29473118535cf9c93da2fc82a43db (diff) | |
| download | android_external_rsync-d1b31da71e426ba7f636430d1764ae76858363d9.tar.gz android_external_rsync-d1b31da71e426ba7f636430d1764ae76858363d9.tar.bz2 android_external_rsync-d1b31da71e426ba7f636430d1764ae76858363d9.zip | |
If we fail writing to the socket and we're receiving error messages
from the other side via a multiplexed input, read the socket to see
if we get some errors that would explain why they went away.
Diffstat (limited to 'io.c')
| -rw-r--r-- | io.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); } |
