You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by jo...@apache.org on 2012/03/13 18:01:23 UTC

svn commit: r1300237 - /subversion/trunk/tools/server-side/svnpubsub/svnpubsub/client.py

Author: joes
Date: Tue Mar 13 17:01:23 2012
New Revision: 1300237

URL: http://svn.apache.org/viewvc?rev=1300237&view=rev
Log:
* trunk/tools/server-side/svnpubsub/svnpubsub/client.py
handle connect() exceptions a bit cleaner

Modified:
    subversion/trunk/tools/server-side/svnpubsub/svnpubsub/client.py

Modified: subversion/trunk/tools/server-side/svnpubsub/svnpubsub/client.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/server-side/svnpubsub/svnpubsub/client.py?rev=1300237&r1=1300236&r2=1300237&view=diff
==============================================================================
--- subversion/trunk/tools/server-side/svnpubsub/svnpubsub/client.py (original)
+++ subversion/trunk/tools/server-side/svnpubsub/svnpubsub/client.py Tue Mar 13 17:01:23 2012
@@ -74,14 +74,11 @@ class Client(asynchat.async_chat):
     self.skipping_headers = True
 
     self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
-    while True:
-      try:
-        self.connect((host, port))
-        break
-      except:
-        self.event_callback('connect failed, reconnecting in %d seconds'
-                            % (RECONNECT_DELAY))
-        time.sleep(RECONNECT_DELAY)
+    try:
+      self.connect((host, port))
+    except:
+      self.event_callback('error')
+      return
         
     ### should we allow for repository restrictions?
     self.push('GET /commits/xml HTTP/1.0\r\n\r\n')