浏览代码

Blocking callbacks till connection is established

master
Dirk Alders 2 年前
父节点
当前提交
cf97fa066c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      __init__.py

+ 1
- 1
__init__.py 查看文件

@@ -41,7 +41,7 @@ logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__)
41 41
 
42 42
 class mqtt_client(object):
43 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 45
         logger.info("Initiating mqtt client instance")
46 46
         self.__callbacks__ = {}
47 47
         self.__client__ = paho.Client(name)                                     # create client object

正在加载...
取消
保存