From c42e092b4e665508237f13f17dec8f2f6e884679 Mon Sep 17 00:00:00 2001 From: Michael Goulish Date: Wed, 25 Jan 2012 20:20:28 +0000 Subject: Backing out change from rev 1235255. This change broke these two tests: qpid.tests.connection.ConnectionTest.testCloseGet qpid.tests.connection.ConnectionTest.testCloseListen git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1235906 13f79535-47bb-0310-9956-ffa450edef68 --- python/qpid/connection.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'python') diff --git a/python/qpid/connection.py b/python/qpid/connection.py index 53b7d8ff7e..7dbefb8778 100644 --- a/python/qpid/connection.py +++ b/python/qpid/connection.py @@ -161,12 +161,9 @@ class Connection(Framer): data = self.sock.recv(64*1024) if self.security_layer_rx and data: status, data = self.security_layer_rx.decode(data) - # 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 + if not data: + self.detach_all() + break except socket.timeout: if self.aborted(): self.close_code = (None, "connection timed out") -- cgit v1.2.1