Commits

Anonymous committed 4e6f996

Added some default non-None timeouts to avoid deadlocks. Hmmm; there must be a better way.

  • Participants
  • Parent commits defee4e
  • Tags 0.2.1

Comments (0)

Files changed (1)

File stompclient/duplex.py

     
     debug = False
     
-    def __init__(self, host, port=61613, socket_timeout=None, connection_pool=None):
+    def __init__(self, host, port=61613, socket_timeout=3.0, connection_pool=None):
         super(BaseBlockingDuplexClient, self).__init__(host, port=port, socket_timeout=socket_timeout, connection_pool=connection_pool)
         self.shutdown_event = threading.Event()
         self.listening_event = threading.Event()
     @type queue_timeout: C{float}  
     """
     
-    def __init__(self, host, port=61613, socket_timeout=None, connection_pool=None, queue_timeout=3.0):
+    def __init__(self, host, port=61613, socket_timeout=3.0, connection_pool=None, queue_timeout=5.0):
         super(QueueingDuplexClient, self).__init__(host, port=port, socket_timeout=socket_timeout, connection_pool=connection_pool)
         self.connected_queue = Queue()
         self.message_queue = Queue()