[CalendarServer-changes] [4878] CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/ client
source_changes at macosforge.org
source_changes at macosforge.org
Thu Dec 17 13:12:17 PST 2009
Revision: 4878
http://trac.macosforge.org/projects/calendarserver/changeset/4878
Author: cdaboo at apple.com
Date: 2009-12-17 13:12:16 -0800 (Thu, 17 Dec 2009)
Log Message:
-----------
Port over some fixes from the deployment code.
Modified Paths:
--------------
CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/client/pool.py
CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/client/reverseproxy.py
Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/client/pool.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/client/pool.py 2009-12-17 20:29:37 UTC (rev 4877)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/client/pool.py 2009-12-17 21:12:16 UTC (rev 4878)
@@ -234,9 +234,16 @@
for ctr in xrange(self.maxRetries + 1):
try:
response = (yield self._submitRequest(request, args, kwargs))
+
except (ConnectionLost, ConnectionDone, ConnectError), e:
self.log_error("HTTP pooled client connection error (attempt: %d) - retrying: %s" % (ctr+1, e,))
continue
+
+ # TODO: find the proper cause of these assertions and fix
+ except (AssertionError,), e:
+ self.log_error("HTTP pooled client connection assertion error (attempt: %d) - retrying: %s" % (ctr+1, e,))
+ continue
+
else:
returnValue(response)
else:
Modified: CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/client/reverseproxy.py
===================================================================
--- CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/client/reverseproxy.py 2009-12-17 20:29:37 UTC (rev 4877)
+++ CalendarServer/branches/users/cdaboo/partition-4464/twistedcaldav/client/reverseproxy.py 2009-12-17 21:12:16 UTC (rev 4878)
@@ -52,7 +52,6 @@
def exists(self):
return False
- @inlineCallbacks
def renderHTTP(self, request):
"""
Do the reverse proxy request and return the response.
@@ -66,5 +65,4 @@
self.logger.info("%s %s %s" % (request.method, urllib.unquote(request.uri), "HTTP/%s.%s" % request.clientproto))
clientPool = getHTTPClientPool(self.poolID)
proxyRequest = ClientRequest(request.method, request.uri, request.headers, request.stream)
- response = (yield clientPool.submitRequest(proxyRequest))
- returnValue(response)
+ return clientPool.submitRequest(proxyRequest)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20091217/120edb52/attachment.html>
More information about the calendarserver-changes
mailing list