[bug] close TxAuthenticator properly
authorChristoph Kluenter <ckluente@thoughtworks.com>
Wed, 16 Mar 2016 16:03:52 +0000 (17:03 +0100)
committerChristoph Kluenter <ckluente@thoughtworks.com>
Wed, 16 Mar 2016 16:12:24 +0000 (17:12 +0100)
otherwise the context.term() does not return

src/leap/common/events/auth.py
src/leap/common/events/zmq_components.py

index 5b71f2d..db217ca 100644 (file)
@@ -76,6 +76,10 @@ class TxAuthenticator(ZmqConnection):
                  user_id, metadata]
         self.send(reply)
 
+    def shutdown(self):
+        if self.factory:
+            super(TxAuthenticator, self).shutdown()
+
 
 class TxAuthenticationRequest(ZmqConnection):
 
index 8919cd9..c533a74 100644 (file)
@@ -158,6 +158,7 @@ class TxZmqComponent(object):
         public_keys_dir = os.path.join(self._config_prefix, PUBLIC_KEYS_PREFIX)
         auth_req.configure_curve(domain="*", location=public_keys_dir)
         auth_req.shutdown()
+        TxZmqComponent._auth.shutdown()
 
         # This has to be set before binding the socket, that's why this method
         # has to be called before addEndpoints()