[Neo-report] r2497 gregory - /trunk/neo/connector.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Dec 9 18:17:23 CET 2010
Author: gregory
Date: Thu Dec 9 18:17:23 2010
New Revision: 2497
Log:
Handle TCP timeout error.
Modified:
trunk/neo/connector.py
Modified: trunk/neo/connector.py
==============================================================================
--- trunk/neo/connector.py [iso-8859-1] (original)
+++ trunk/neo/connector.py [iso-8859-1] Thu Dec 9 18:17:23 2010
@@ -124,7 +124,7 @@ class SocketConnector:
raise ConnectorTryAgainException
if err in (errno.ECONNREFUSED, errno.EHOSTUNREACH):
raise ConnectorConnectionRefusedException
- if err == errno.ECONNRESET:
+ if err in (errno.ECONNRESET, errno.ETIMEDOUT):
raise ConnectorConnectionClosedException
raise ConnectorException, 'receive failed: %s:%s' % (err, errmsg)
@@ -134,7 +134,7 @@ class SocketConnector:
except socket.error, (err, errmsg):
if err == errno.EAGAIN:
raise ConnectorTryAgainException
- if err in (errno.ECONNRESET, errno.EPIPE):
+ if err in (errno.ECONNRESET, errno.ETIMEDOUT, errno.EPIPE):
raise ConnectorConnectionClosedException
raise ConnectorException, 'send failed: %s:%s' % (err, errmsg)
More information about the Neo-report
mailing list