Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d620b90
)
Tweak the noop_io_until_death() timeout and comment it.
author
Wayne Davison
<wayned@samba.org>
Sun, 15 Nov 2009 07:05:52 +0000
(23:05 -0800)
committer
Wayne Davison
<wayned@samba.org>
Sun, 15 Nov 2009 07:05:52 +0000
(23:05 -0800)
io.c
patch
|
blob
|
blame
|
history
diff --git
a/io.c
b/io.c
index
ad5a9c7
..
08afdd9
100644
(file)
--- a/
io.c
+++ b/
io.c
@@
-807,7
+807,12
@@
void noop_io_until_death(void)
char buf[1024];
kluge_around_eof = 1;
char buf[1024];
kluge_around_eof = 1;
- set_io_timeout(protocol_version >= 31 ? 10 : 1);
+ /* For protocol 31: setting an I/O timeout ensures that if something
+ * inexplicably weird happens, we won't hang around forever. For older
+ * protocols: we can't tell the other side to die, so we linger a brief
+ * time (to try to give our error messages time to arrive) and then let
+ * the "unexpectedly" closed socket tell them to die. */
+ set_io_timeout(protocol_version >= 31 ? 30 : 1);
while (1)
read_buf(iobuf.in_fd, buf, sizeof buf);
while (1)
read_buf(iobuf.in_fd, buf, sizeof buf);