diff options
author | Michael Goulish <mgoulish@apache.org> | 2012-01-24 14:06:06 +0000 |
---|---|---|
committer | Michael Goulish <mgoulish@apache.org> | 2012-01-24 14:06:06 +0000 |
commit | da77782d12bdd2b74a3b156e3fdc379c99e0b612 (patch) | |
tree | 58aac665f071801be91e24a3cfae4a7dd5e7c0ba | |
parent | 97ddc87d5fd8a2caf3608939ecd8822aec3f8b0d (diff) | |
download | qpid-python-da77782d12bdd2b74a3b156e3fdc379c99e0b612.tar.gz |
qpid-3778
see comment in code.
this was causing a "connection aborted" failure when qpid-stat was connected
through MD5, and there were several qpid-tools also connected, not in any
special way, and not doing anything.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1235255 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | python/qpid/connection.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/python/qpid/connection.py b/python/qpid/connection.py index 7dbefb8778..53b7d8ff7e 100644 --- a/python/qpid/connection.py +++ b/python/qpid/connection.py @@ -161,9 +161,12 @@ class Connection(Framer): data = self.sock.recv(64*1024) if self.security_layer_rx and data: status, data = self.security_layer_rx.decode(data) - if not data: - self.detach_all() - break + # zero-length data is OK, as long as return code is good. + # when that happens, just keep trying. the sasl library + # will send us data eventually. ( or an error code. ) + if not status: + self.detach_all() + break except socket.timeout: if self.aborted(): self.close_code = (None, "connection timed out") |