Browse Source

Blocking callbacks till connection is established

master
Dirk Alders 2 years ago
parent
commit
cf97fa066c
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      __init__.py

+ 1
- 1
__init__.py View File

41
 
41
 
42
 class mqtt_client(object):
42
 class mqtt_client(object):
43
     def __init__(self, name, host, port=1883, username=None, password=None):
43
     def __init__(self, name, host, port=1883, username=None, password=None):
44
-        self.__block_add_callbacks__ = False
44
+        self.__block_add_callbacks__ = True
45
         logger.info("Initiating mqtt client instance")
45
         logger.info("Initiating mqtt client instance")
46
         self.__callbacks__ = {}
46
         self.__callbacks__ = {}
47
         self.__client__ = paho.Client(name)                                     # create client object
47
         self.__client__ = paho.Client(name)                                     # create client object

Loading…
Cancel
Save