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 | 58e26a83d2d1bccebc28302be396e5c7b625e7ff (patch) | |
tree | 7001c0d7aad9e567f652eccfab1af1148fa0cbfe | |
parent | 8368bc980e2989299f032749d62f7ae20ceec4da (diff) | |
download | qpid-python-58e26a83d2d1bccebc28302be396e5c7b625e7ff.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@1235255 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | qpid/python/qpid/connection.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/qpid/python/qpid/connection.py b/qpid/python/qpid/connection.py index 7dbefb8778..53b7d8ff7e 100644 --- a/qpid/python/qpid/connection.py +++ b/qpid/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") |