From: Andrew Tridgell Date: Sun, 23 Jan 2000 01:11:43 +0000 (+0000) Subject: don't try to write errors to a dead socket X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/5d1e1dcf4b9d4d9e0308d3e7f7036b4e5191e323 don't try to write errors to a dead socket --- diff --git a/io.c b/io.c index 9e2a4757..4fd1a138 100644 --- a/io.c +++ b/io.c @@ -112,6 +112,7 @@ static int read_timeout(int fd, char *buf, int len) continue; } + if (n == 0) { if (eof_error) { rprintf(FERROR,"unexpected EOF in read_timeout\n"); @@ -119,6 +120,9 @@ static int read_timeout(int fd, char *buf, int len) exit_cleanup(RERR_STREAMIO); } + /* this prevents us trying to write errors on a dead socket */ + io_multiplexing_out = 0; + rprintf(FERROR,"read error: %s\n", strerror(errno)); exit_cleanup(RERR_STREAMIO); }