diff options
| author | Michael Goulish <mgoulish@apache.org> | 2012-03-14 14:33:28 +0000 |
|---|---|---|
| committer | Michael Goulish <mgoulish@apache.org> | 2012-03-14 14:33:28 +0000 |
| commit | b78b774d4a93316b4b6c7157870a523328036abb (patch) | |
| tree | 6609279826938a012f85d702dca50268c7acb59f /python | |
| parent | e5059554020c72d88f73cf32405ec047a7d4fb15 (diff) | |
| download | qpid-python-b78b774d4a93316b4b6c7157870a523328036abb.tar.gz | |
QPID-3898
When connecting through SSL, qpid-tool starts disconnecting and
reconnecting every 10 seconds.
The connection it makes is good -- it gets real data. But then
it unilaterally decides to disconnect, immediately reconnects --
and cycles this way forever. Well -- until you stop it, anyway.
qpid-stat does not do this.
This is similar to a problem that was fixed long ago in the original
code -- but that was written before SSL support was available in Python.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1300562 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python')
| -rw-r--r-- | python/qpid/connection.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/python/qpid/connection.py b/python/qpid/connection.py index f2c83d113c..66e1cb49be 100644 --- a/python/qpid/connection.py +++ b/python/qpid/connection.py @@ -170,6 +170,10 @@ class Connection(Framer): if not status: self.detach_all() break + # When we do not use SSL transport, we get periodic + # spurious timeout events on the socket. When using SSL, + # these events show up as timeout *errors*. Both should be + # ignored unless we have aborted. except socket.timeout: if self.aborted(): self.close_code = (None, "connection timed out") @@ -178,9 +182,12 @@ class Connection(Framer): else: continue except socket.error, e: - self.close_code = (None, str(e)) - self.detach_all() - break + if self.aborted() or str(e) != "The read operation timed out": + self.close_code = (None, str(e)) + self.detach_all() + break + else: + continue frame_dec.write(data) seg_dec.write(*frame_dec.read()) op_dec.write(*seg_dec.read()) |
