diff --git a/enviro/__init__.py b/enviro/__init__.py index 415c1ed..72d6df8 100644 --- a/enviro/__init__.py +++ b/enviro/__init__.py @@ -213,7 +213,7 @@ def wait_status(expected_status, *, timeout=10, tick_sleep=0.5): # Disconnect when necessary status = dump_status() - if status >= CYW43_LINK_JOIN and status <= CYW43_LINK_UP: + if status >= CYW43_LINK_JOIN and status < CYW43_LINK_UP: logging.info("> Disconnecting...") wlan.disconnect() try: