PROTON-1023: fix handling of detach following attach for BlockingConnection


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/ea52a274
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/ea52a274
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/ea52a274

Branch: refs/heads/go1
Commit: ea52a2742e9e2e1607dcb1090e52a6a49bef8aa1
Parents: 52dd42d
Author: Gordon Sim <g...@redhat.com>
Authored: Mon Oct 19 13:54:35 2015 +0100
Committer: Gordon Sim <g...@redhat.com>
Committed: Mon Oct 19 13:55:11 2015 +0100

----------------------------------------------------------------------
 proton-c/bindings/python/proton/utils.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/ea52a274/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 acc4c34..3682455 100644
--- a/proton-c/bindings/python/proton/utils.py
+++ b/proton-c/bindings/python/proton/utils.py
@@ -32,10 +32,12 @@ class BlockingLink(object):
                              msg="Opening link %s" % link.name)
         self._checkClosed()
 
-    def _waitForClosed(self, timeout=1):
-        self.connection.wait(lambda: self.link.state & Endpoint.REMOTE_CLOSED,
-                             timeout=timeout,
-                             msg="Opening link %s" % self.link.name)
+    def _waitForClose(self, timeout=1):
+        try:
+            self.connection.wait(lambda: self.link.state & 
Endpoint.REMOTE_CLOSED,
+                                 timeout=timeout,
+                                 msg="Opening link %s" % self.link.name)
+        except Timeout as e: pass
         self._checkClosed()
 
     def _checkClosed(self):


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org

Reply via email to