Workaround for deadlock problem in zmq auth
authorFolker Bernitt <fbernitt@thoughtworks.com>
Wed, 21 Oct 2015 08:07:06 +0000 (10:07 +0200)
committerKali Kaneko <kali@leap.se>
Wed, 21 Oct 2015 16:25:33 +0000 (12:25 -0400)
- See https://leap.se/code/issues/7536
- Actual root cause not identified yet

src/leap/common/events/zmq_components.py

index 729ca90..51de02c 100644 (file)
@@ -25,6 +25,7 @@ import os
 import logging
 import txzmq
 import re
+import time
 
 from abc import ABCMeta
 
@@ -154,6 +155,11 @@ class TxZmqComponent(object):
         :type socket: zmq.Socket
         """
         authenticator = ThreadAuthenticator(self._factory.context)
+
+        # Temporary fix until we understand what the problem is
+        # See https://leap.se/code/issues/7536
+        time.sleep(0.5)
+
         authenticator.start()
         # XXX do not hardcode this here.
         authenticator.allow('127.0.0.1')