You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2015/11/23 18:57:49 UTC
[21/50] [abbrv] qpid-proton git commit: PROTON-1000: break
circularites via receiver handler
PROTON-1000: break circularites via receiver handler
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/9cf3ab8e
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/9cf3ab8e
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/9cf3ab8e
Branch: refs/heads/go1
Commit: 9cf3ab8ee0096d60629c6cec440421c1a4892cb0
Parents: 07dc168
Author: Gordon Sim <gs...@redhat.com>
Authored: Fri Nov 6 18:15:30 2015 +0000
Committer: Gordon Sim <gs...@redhat.com>
Committed: Fri Nov 6 18:15:30 2015 +0000
----------------------------------------------------------------------
proton-c/bindings/python/proton/utils.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/9cf3ab8e/proton-c/bindings/python/proton/utils.py
----------------------------------------------------------------------
diff --git a/proton-c/bindings/python/proton/utils.py b/proton-c/bindings/python/proton/utils.py
index bc44adf..5094285 100644
--- a/proton-c/bindings/python/proton/utils.py
+++ b/proton-c/bindings/python/proton/utils.py
@@ -131,6 +131,10 @@ class BlockingReceiver(BlockingLink):
if credit: receiver.flow(credit)
self.fetcher = fetcher
+ def __del__(self):
+ self.fetcher = None
+ self.link.handler = None
+
def receive(self, timeout=False):
if not self.fetcher:
raise Exception("Can't call receive on this receiver as a handler was provided")
@@ -217,8 +221,12 @@ class BlockingConnection(Handler):
def close(self):
self.conn.close()
- self.wait(lambda: not (self.conn.state & Endpoint.REMOTE_ACTIVE),
- msg="Closing connection")
+ try:
+ self.wait(lambda: not (self.conn.state & Endpoint.REMOTE_ACTIVE),
+ msg="Closing connection")
+ finally:
+ self.conn = None
+ self.container = None
def _is_closed(self):
return self.conn.state & (Endpoint.LOCAL_CLOSED | Endpoint.REMOTE_CLOSED)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org