Fixed missing detached property handling

This commit is contained in:
Mark Qvist 2026-09-29 20:21:32 +02:00
parent 47318034dd
commit 942434b288
No known key found for this signature in database

View file

@ -208,6 +208,7 @@ class TCPClientInterface(Interface):
def detach(self):
self.online = False
self.detached = True
if self.socket != None:
if hasattr(self.socket, "close"):
if callable(self.socket.close):
@ -272,7 +273,7 @@ class TCPClientInterface(Interface):
if not self.reconnecting:
self.reconnecting = True
attempts = 0
while not self.online:
while not self.online and not self.detached:
time.sleep(TCPClientInterface.RECONNECT_WAIT)
attempts += 1