Skip to content

Commit c774ba3

Browse files
committed
MQTT: Connect early to MQTT to allow dumping of the initial login process
1 parent 8d2c1e2 commit c774ba3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/mqtt_gateway.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ def __select_publisher(self) -> Publisher:
7575
return ConsolePublisher(self.configuration)
7676

7777
async def run(self) -> None:
78+
LOG.info("Connecting to MQTT Broker")
79+
await self.publisher.connect()
80+
7881
message_request_interval = self.configuration.messages_request_interval
7982
await self.__do_initial_login(message_request_interval)
8083

@@ -96,8 +99,6 @@ async def run(self) -> None:
9699
name="Check for new messages",
97100
max_instances=1,
98101
)
99-
LOG.info("Connecting to MQTT Broker")
100-
await self.publisher.connect()
101102

102103
LOG.info("Starting scheduler")
103104
self.__scheduler.start()

0 commit comments

Comments
 (0)