瀏覽代碼

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

Loading…
取消
儲存