summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2008-08-18 19:13:21 +0000
committerGordon Sim <gsim@apache.org>2008-08-18 19:13:21 +0000
commita6ae7700e7b043abf02b15070a1842322795388c (patch)
treee9c0ee8738b6d187c68dc2d9996a9496a6933d90
parent21509cc8f4de0db81358d1f52819fc246bb68b3f (diff)
downloadqpid-python-a6ae7700e7b043abf02b15070a1842322795388c.tar.gz
QPID-1250: Ensure broker receives session.detached before channel can be reused. Merge of 686818 from trunk.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-10@686851 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--python/qpid/delegates.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/python/qpid/delegates.py b/python/qpid/delegates.py
index 69b93e73dc..bf26553dda 100644
--- a/python/qpid/delegates.py
+++ b/python/qpid/delegates.py
@@ -74,8 +74,13 @@ class Delegate:
notify(ch.session.condition)
def session_detach(self, ch, d):
- ssn = self.connection.detach(d.name, ch)
+ #send back the confirmation of detachment before removing the
+ #channel from the attached set; this avoids needing to hold the
+ #connection lock during the sending of this control and ensures
+ #that if the channel is immediately reused for a new session the
+ #attach request will follow the detached notification.
ch.session_detached(d.name)
+ ssn = self.connection.detach(d.name, ch)
def session_detached(self, ch, d):
self.connection.detach(d.name, ch)