Author: mgoulish
Date: Tue Jan 24 14:06:06 2012
New Revision: 1235255
URL: http://svn.apache.org/viewvc?rev=1235255&view=rev
Log:
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.
Modified:
qpid/trunk/qpid/python/qpid/connection.py
Modified: qpid/trunk/qpid/python/qpid/connection.py
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/connection.py?rev=1235255&r1=1235254&r2=1235255&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid/connection.py (original)
+++ qpid/trunk/qpid/python/qpid/connection.py Tue Jan 24 14:06:06 2012
@@ -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")
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]