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

bin/emerge

index e88a7fc1d62eba5cd24e2b11480eb9cfd4bdfdec..b9c49d6d9d63b569aec253713e914324d4e1fdf3 100755 (executable)
@@ -3922,7 +3922,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")