Even if there's no timestamp available locally, fetch the timestamp anyway as an...
authorZac Medico <zmedico@gentoo.org>
Fri, 2 Mar 2007 01:47:34 +0000 (01:47 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 2 Mar 2007 01:47:34 +0000 (01:47 -0000)
svn path=/main/trunk/; revision=6127

pym/emerge/__init__.py

index 5a1fedbd4fc37d6feea3f9ab548ca1d2c8622971..10dfe9d3cd8578f255ac7e925dd8d61dcd087cf1 100644 (file)
@@ -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")