Skip to content

Commit d9a4ad5

Browse files
committed
Bug fix: InelsMqtt.test_connection
1 parent 400029c commit d9a4ad5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

inelsmqtt/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ def test_connection(self) -> Optional[int]:
191191
"""
192192
self.__connection_error = None
193193

194-
def on_connect(client, userdata, flags, rc):
195-
if rc != 0:
196-
self.__connection_error = rc
194+
def on_connect(client, userdata, connect_flags, reason_code, properties):
195+
if reason_code != 0:
196+
self.__connection_error = reason_code
197197
else:
198198
self.__try_connect = True
199199

0 commit comments

Comments
 (0)