flucto-gmbh / heisskleber

MIT License
0 stars 1 forks source link

Bug: Mqtt publisher crashes #99

Closed pacjac closed 6 months ago

pacjac commented 6 months ago

Bug

Mqtt publisher crashes on send.

File "/path/to/heisskleber/mqtt/publisher.py", line 29, in send
    if not self.client.is_connected():
           ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'is_connected'

Solution

if not self.client:
    self.client = self.connect()