diff --git a/mqtt_srv.py b/mqtt_srv.py index 57cc17f..5408afa 100755 --- a/mqtt_srv.py +++ b/mqtt_srv.py @@ -311,9 +311,13 @@ def get_ip(): finally: s.close() return IP - - -IP = get_ip() +ex = 0 +while ex == 0: + try: + IP = get_ip() + ex = 1 + except: + time.sleep(5) print("OS : " + curos)