Skip to content

Commit

Permalink
fix: break the loop when connected
Browse files Browse the repository at this point in the history
  • Loading branch information
caibinqing committed Jul 26, 2024
1 parent 06c4e02 commit 9732e01
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions midealocal/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ def connect(self) -> bool:
self._socket.connect((self._ip_address, self._port))
_LOGGER.debug("[%s] Connected", self._device_id)
connected = True
break
except TimeoutError:
_LOGGER.debug("[%s] Connection timed out", self._device_id)
except OSError:
Expand Down

0 comments on commit 9732e01

Please sign in to comment.