Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Iture committed Nov 6, 2022
1 parent 58c9622 commit cd51a76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MQTTClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ def __init__(self, messageQ, commandQ, config) -> None:
self.connect(self.config)


def connect (self,config):
def connect (self,config) -> None:
try:
result = self._mqttConn.connect(config['mqtt_host'], port=config['mqtt_port'], keepalive=120)
self._mqttConn.connect(config['mqtt_host'], port=config['mqtt_port'], keepalive=120)
except:
self.logger.error("problem with connect:%s" % result)
self.logger.error("problem with connect")
def close(self) -> None:
self.logger.info("Closing connection")
self._mqttConn.disconnect()
Expand Down

0 comments on commit cd51a76

Please sign in to comment.