fix: Do not connect a disabled broker

This commit is contained in:
Rigear
2026-04-19 22:18:35 -07:00
parent 11f749e0e9
commit 096c5a8f07
@@ -285,6 +285,10 @@ class _BrokerConnection:
def connect(self):
"""Establish connection to broker"""
# Conditional TLS setup
if self.enabled == False:
logger.info(f"Connection to {self.broker['name']} is disabled in configuration")
return
if self.transport == "websockets":
if self.tls and self.tls.get("enabled", True):
import ssl