You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2008/08/18 18:52:12 UTC

svn commit: r686818 - /incubator/qpid/trunk/qpid/python/qpid/delegates.py

Author: gsim
Date: Mon Aug 18 09:52:11 2008
New Revision: 686818

URL: http://svn.apache.org/viewvc?rev=686818&view=rev
Log:
QPID-1250: Ensure broker receives session.detached before channel can be reused.


Modified:
    incubator/qpid/trunk/qpid/python/qpid/delegates.py

Modified: incubator/qpid/trunk/qpid/python/qpid/delegates.py
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/python/qpid/delegates.py?rev=686818&r1=686817&r2=686818&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/python/qpid/delegates.py (original)
+++ incubator/qpid/trunk/qpid/python/qpid/delegates.py Mon Aug 18 09:52:11 2008
@@ -74,8 +74,13 @@
     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)