Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 22DDE992A for ; Mon, 12 Mar 2012 02:03:03 +0000 (UTC) Received: (qmail 60546 invoked by uid 500); 12 Mar 2012 02:03:03 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 60489 invoked by uid 500); 12 Mar 2012 02:03:02 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 60481 invoked by uid 99); 12 Mar 2012 02:03:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Mar 2012 02:03:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Mar 2012 02:02:59 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4E579238897A; Mon, 12 Mar 2012 02:02:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1299519 - /subversion/trunk/tools/server-side/svnpubsub/svnpubsub/client.py Date: Mon, 12 Mar 2012 02:02:38 -0000 To: commits@subversion.apache.org From: joes@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120312020238.4E579238897A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: joes Date: Mon Mar 12 02:02:37 2012 New Revision: 1299519 URL: http://svn.apache.org/viewvc?rev=1299519&view=rev Log: * trunk/tools/server-side/svnpubsub/svnpubsub/client.py Force the reconnect to eventually happen. There is probably a better way of doing this, but for now this code is both necessary and sufficient. 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=1299519&r1=1299518&r2=1299519&view=diff ============================================================================== --- subversion/trunk/tools/server-side/svnpubsub/svnpubsub/client.py (original) +++ subversion/trunk/tools/server-side/svnpubsub/svnpubsub/client.py Mon Mar 12 02:02:37 2012 @@ -74,7 +74,15 @@ class Client(asynchat.async_chat): self.skipping_headers = True self.create_socket(socket.AF_INET, socket.SOCK_STREAM) - self.connect((host, port)) + while True: + try: + self.connect((host, port)) + break + except: + self.event_callback('connect failed, reconnecting in %d seconds' + % (RECONNECT_DELAY)) + time.sleep(RECONNECT_DELAY) + ### should we allow for repository restrictions? self.push('GET /commits/xml HTTP/1.0\r\n\r\n')