diff options
| -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") |
