diff options
author | Rafael H. Schloming <rhs@apache.org> | 2010-02-16 03:26:06 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2010-02-16 03:26:06 +0000 |
commit | 0c3950cee69412bd3b7c1790fd452799af25d5da (patch) | |
tree | ae6bed85dbbdcce8d1b91d0b38db2ff322737863 | |
parent | 7ce33f903c55044082ff56b6f833741dabeb1858 (diff) | |
download | qpid-python-0c3950cee69412bd3b7c1790fd452799af25d5da.tar.gz |
capture and report socket errors
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@910382 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | python/qpid/connection.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/qpid/connection.py b/python/qpid/connection.py index 81ce446ab6..39fd7d5ff8 100644 --- a/python/qpid/connection.py +++ b/python/qpid/connection.py @@ -163,13 +163,15 @@ class Connection(Framer): break except socket.timeout: if self.aborted(): + self.close_code = (None, "connection timed out") self.detach_all() - raise Closed("connection timed out") + break else: continue except socket.error, e: + self.close_code = (None, str(e)) self.detach_all() - raise Closed(e) + break frame_dec.write(data) seg_dec.write(*frame_dec.read()) op_dec.write(*seg_dec.read()) |