Skip to content

Commit

Permalink
using is not to include timeout=0w!
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Nov 1, 2024
1 parent fb69f00 commit 468ef5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion micropython/umqtt.simple/umqtt/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def set_last_will(self, topic, msg, retain=False, qos=0):

def connect(self, clean_session=True, timeout=None):
self.sock = socket.socket()
if timeout:
if timeout is not None:
self.sock.settimeout(timeout)
addr = socket.getaddrinfo(self.server, self.port)[0][-1]
self.sock.connect(addr)
Expand Down

0 comments on commit 468ef5b

Please sign in to comment.