mirror of
https://github.com/pyMC-dev/pyMC_Repeater.git
synced 2026-08-06 17:03:32 +02:00
fix: Do not connect a disabled broker
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user