PROTON-846: check whether connection is valid

(cherry picked from commit 5bf533c2eeb3cd17f64e6b90748bc23960d4a185)


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

Branch: refs/heads/0.9.x
Commit: 62a97b66c5c43f5d77b95aecd7a81b2936035ae8
Parents: 8ae8bda
Author: Gordon Sim <[email protected]>
Authored: Tue Apr 7 10:03:43 2015 +0100
Committer: Robert Gemmell <[email protected]>
Committed: Mon Apr 27 15:12:49 2015 +0100

----------------------------------------------------------------------
 proton-c/bindings/python/proton/handlers.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/62a97b66/proton-c/bindings/python/proton/handlers.py
----------------------------------------------------------------------
diff --git a/proton-c/bindings/python/proton/handlers.py 
b/proton-c/bindings/python/proton/handlers.py
index 5411a1d..6836788 100644
--- a/proton-c/bindings/python/proton/handlers.py
+++ b/proton-c/bindings/python/proton/handlers.py
@@ -370,7 +370,7 @@ class EndpointStateHandler(Handler):
         self.on_transport_closed(event)
 
     def on_transport_closed(self, event):
-        if self.delegate and self.is_local_open(event.connection):
+        if self.delegate and event.connection and 
self.is_local_open(event.connection):
             dispatch(self.delegate, 'on_disconnected', event)
 
 class MessagingHandler(Handler, Acking):


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to