Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59224e0 commit 4c30fe8Copy full SHA for 4c30fe8
clearblade/Messaging.py
@@ -140,7 +140,13 @@ def clear_will(self):
140
def connect(self, will_topic=None, will_payload=1883):
141
cbLogs.info("Connecting to MQTT.")
142
if self.__use_tls:
143
- self.__mqttc.tls_set()
+ try:
144
+ self.__mqttc.tls_set()
145
+ except ValueError as e:
146
+ if str(e) == "SSL/TLS has already been configured.":
147
+ pass
148
+ else:
149
+ raise e
150
self.__mqttc.connect(self.__url, self.__port, self.__keepalive)
151
self.__mqttc.loop_start()
152
0 commit comments