Commit 72026f6d authored by Vincent Pelletier's avatar Vincent Pelletier

Catch (and reraise) all exceptions instead of just ConnectorException.

Any exception triggered by low-level code should cause a log and
connection closure before being propagated.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2019 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent da1d013f
...@@ -477,7 +477,7 @@ class Connection(BaseConnection): ...@@ -477,7 +477,7 @@ class Connection(BaseConnection):
# should not occurs but it seems it's false # should not occurs but it seems it's false
logging.debug('Connection reset by peer: %r', self.connector) logging.debug('Connection reset by peer: %r', self.connector)
self._closure() self._closure()
except ConnectorException: except:
logging.debug('Unknown connection error: %r', self.connector) logging.debug('Unknown connection error: %r', self.connector)
self._closure() self._closure()
# unhandled connector exception # unhandled connector exception
...@@ -505,7 +505,7 @@ class Connection(BaseConnection): ...@@ -505,7 +505,7 @@ class Connection(BaseConnection):
# connection resetted by peer # connection resetted by peer
logging.debug('Connection reset by peer: %r', self.connector) logging.debug('Connection reset by peer: %r', self.connector)
self._closure() self._closure()
except ConnectorException: except:
logging.debug('Unknown connection error: %r', self.connector) logging.debug('Unknown connection error: %r', self.connector)
# unhandled connector exception # unhandled connector exception
self._closure() self._closure()
......
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