From cf97fa066cdff0e2f7eda0ff4d3c8c0f59c3f2ec Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Tue, 13 Sep 2022 06:51:17 +0200 Subject: [PATCH] Blocking callbacks till connection is established --- __init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 8f0b72d..5b12c55 100644 --- a/__init__.py +++ b/__init__.py @@ -41,7 +41,7 @@ logger = logging.getLogger(ROOT_LOGGER_NAME).getChild(__name__) class mqtt_client(object): def __init__(self, name, host, port=1883, username=None, password=None): - self.__block_add_callbacks__ = False + self.__block_add_callbacks__ = True logger.info("Initiating mqtt client instance") self.__callbacks__ = {} self.__client__ = paho.Client(name) # create client object