Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
don't try to write errors to a dead socket
[rsync/rsync.git]
/
io.c
diff --git
a/io.c
b/io.c
index
9e2a475
..
4fd1a13
100644
(file)
--- a/
io.c
+++ b/
io.c
@@
-112,6
+112,7
@@
static int read_timeout(int fd, char *buf, int len)
continue;
}
continue;
}
+
if (n == 0) {
if (eof_error) {
rprintf(FERROR,"unexpected EOF in read_timeout\n");
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);
}
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);
}
rprintf(FERROR,"read error: %s\n", strerror(errno));
exit_cleanup(RERR_STREAMIO);
}