[CalendarServer-changes] [4855] CalendarServer/branches/users/cdaboo/deployment-partition-4722/ twistedcaldav/client
source_changes at macosforge.org
source_changes at macosforge.org
Fri Dec 11 09:15:32 PST 2009
Revision: 4855
http://trac.macosforge.org/projects/calendarserver/changeset/4855
Author: cdaboo at apple.com
Date: 2009-12-11 09:15:32 -0800 (Fri, 11 Dec 2009)
Log Message:
-----------
Temporarily handle assertion error from client requests.
Modified Paths:
--------------
CalendarServer/branches/users/cdaboo/deployment-partition-4722/twistedcaldav/client/pool.py
CalendarServer/branches/users/cdaboo/deployment-partition-4722/twistedcaldav/client/reverseproxy.py
Modified: CalendarServer/branches/users/cdaboo/deployment-partition-4722/twistedcaldav/client/pool.py
===================================================================
--- CalendarServer/branches/users/cdaboo/deployment-partition-4722/twistedcaldav/client/pool.py 2009-12-11 03:34:10 UTC (rev 4854)
+++ CalendarServer/branches/users/cdaboo/deployment-partition-4722/twistedcaldav/client/pool.py 2009-12-11 17:15:32 UTC (rev 4855)
@@ -237,6 +237,11 @@
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/deployment-partition-4722/twistedcaldav/client/reverseproxy.py
===================================================================
--- CalendarServer/branches/users/cdaboo/deployment-partition-4722/twistedcaldav/client/reverseproxy.py 2009-12-11 03:34:10 UTC (rev 4854)
+++ CalendarServer/branches/users/cdaboo/deployment-partition-4722/twistedcaldav/client/reverseproxy.py 2009-12-11 17:15:32 UTC (rev 4855)
@@ -18,7 +18,6 @@
"ReverseProxyResource",
]
-from twisted.internet.defer import inlineCallbacks, returnValue
from twisted.web2 import iweb
from twisted.web2.client.http import ClientRequest
from twisted.web2.resource import LeafResource
@@ -52,7 +51,6 @@
def exists(self):
return False
- @inlineCallbacks
def renderHTTP(self, request):
"""
Do the reverse proxy request and return the response.
@@ -66,5 +64,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/20091211/d2a0052d/attachment.html>
More information about the calendarserver-changes
mailing list