From fdad51fbc130f9f67e57ed9fa9c330f002d97344 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 2 Mar 2007 01:47:34 +0000 Subject: Even if there's no timestamp available locally, fetch the timestamp anyway as an initial probe to verify that the server is responsive. This protects us from hanging indefinitely on a connection attempt to an unresponsive server which rsync's --timeout option does not prevent. svn path=/main/trunk/; revision=6127 --- pym/emerge/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pym/emerge/__init__.py b/pym/emerge/__init__.py index 5a1fedbd4..10dfe9d3c 100644 --- a/pym/emerge/__init__.py +++ b/pym/emerge/__init__.py @@ -3983,7 +3983,12 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): exitcode = os.EX_OK servertimestamp = 0 - if mytimestamp != 0: + # Even if there's no timestamp available locally, fetch the + # timestamp anyway as an initial probe to verify that the server is + # responsive. This protects us from hanging indefinitely on a + # connection attempt to an unresponsive server which rsync's + # --timeout option does not prevent. + if True: mycommand = rsynccommand.split() mycommand.append(dosyncuri.rstrip("/") + \ "/metadata/timestamp.chk") -- cgit v1.2.3-1-g7c22