autocommit
This commit is contained in:
@@ -34,6 +34,7 @@ def release_and_renew(timeout=20):
|
||||
renew_process = subprocess.run(renew_cmd, capture_output=True, text=True, timeout=timeout)
|
||||
# renew wlan0 so default gateway issue is fixed (issue: broken internet connection for ui and all)
|
||||
renew_cmd[-1] = "wlan0"
|
||||
print(renew_cmd)
|
||||
subprocess.run(renew_cmd, timeout=timeout)
|
||||
|
||||
result_info["release_stderr"] = release_process.stderr
|
||||
|
||||
@@ -26,10 +26,10 @@ import os
|
||||
|
||||
async def maintain_connection_to_tello(state):
|
||||
state["connection"] = "NOK"
|
||||
await asyncio.to_thread(nmcli.connection.reload)
|
||||
while True:
|
||||
await asyncio.sleep(0.5)
|
||||
if state["connection"] == "NOK":
|
||||
await asyncio.to_thread(nmcli.connection.reload)
|
||||
resp = await asyncio.to_thread(release_and_renew, 20)
|
||||
if resp["status"] == "done":
|
||||
if await asyncio.to_thread(check_dhcp_ip, resp["renew_stderr"]):
|
||||
|
||||
Reference in New Issue
Block a user