aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2009-11-14 23:05:52 -0800
committerWayne Davison <wayned@samba.org>2009-11-14 23:05:52 -0800
commitd85d029b923a747fdf9fbf39154f8424129f7023 (patch)
treefaf828bfc4bb892309d35f1bbf794800e8bc711c /io.c
parentd620b907e4e601af681db96ef75c3baf74fe9697 (diff)
downloadandroid_external_rsync-d85d029b923a747fdf9fbf39154f8424129f7023.tar.gz
android_external_rsync-d85d029b923a747fdf9fbf39154f8424129f7023.tar.bz2
android_external_rsync-d85d029b923a747fdf9fbf39154f8424129f7023.zip
Tweak the noop_io_until_death() timeout and comment it.
Diffstat (limited to 'io.c')
-rw-r--r--io.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/io.c b/io.c
index ad5a9c76..08afdd92 100644
--- a/io.c
+++ b/io.c
@@ -807,7 +807,12 @@ void noop_io_until_death(void)
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);