Commit 54196ec1 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Handle TCP timeout error.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2497 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 212ec1d1
...@@ -124,7 +124,7 @@ class SocketConnector: ...@@ -124,7 +124,7 @@ class SocketConnector:
raise ConnectorTryAgainException raise ConnectorTryAgainException
if err in (errno.ECONNREFUSED, errno.EHOSTUNREACH): if err in (errno.ECONNREFUSED, errno.EHOSTUNREACH):
raise ConnectorConnectionRefusedException raise ConnectorConnectionRefusedException
if err == errno.ECONNRESET: if err in (errno.ECONNRESET, errno.ETIMEDOUT):
raise ConnectorConnectionClosedException raise ConnectorConnectionClosedException
raise ConnectorException, 'receive failed: %s:%s' % (err, errmsg) raise ConnectorException, 'receive failed: %s:%s' % (err, errmsg)
...@@ -134,7 +134,7 @@ class SocketConnector: ...@@ -134,7 +134,7 @@ class SocketConnector:
except socket.error, (err, errmsg): except socket.error, (err, errmsg):
if err == errno.EAGAIN: if err == errno.EAGAIN:
raise ConnectorTryAgainException raise ConnectorTryAgainException
if err in (errno.ECONNRESET, errno.EPIPE): if err in (errno.ECONNRESET, errno.ETIMEDOUT, errno.EPIPE):
raise ConnectorConnectionClosedException raise ConnectorConnectionClosedException
raise ConnectorException, 'send failed: %s:%s' % (err, errmsg) raise ConnectorException, 'send failed: %s:%s' % (err, errmsg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment