From f1e00165dd741c383bca69c448898bab4a7ce814 Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Thu, 18 Jan 2007 08:14:36 +0000 Subject: Modified handling of reason for closing in peer to work around race between worker and reader where a connection.close is followed by the socket closing (this is a bit of a hack). Modified test for queue_purge to do cleanup on new connection. Separated testing of scenario where closed channel is used from that where an unopened channel is used. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@497342 13f79535-47bb-0310-9956-ffa450edef68 --- python/qpid/peer.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'python/qpid') diff --git a/python/qpid/peer.py b/python/qpid/peer.py index acffeb2537..a265e45f43 100644 --- a/python/qpid/peer.py +++ b/python/qpid/peer.py @@ -129,6 +129,8 @@ class Channel: self.reason = None def close(self, reason): + if isinstance(reason, Message): + self.reason = reason if self.closed: return self.closed = True -- cgit v1.2.1