diff --git a/main.py b/main.py index f14998a..2047aaa 100644 --- a/main.py +++ b/main.py @@ -4,6 +4,7 @@ import asyncio import subprocess from pathlib import Path import shutil +import time # api_id = #api_hash = "" @@ -57,9 +58,12 @@ def unoCheck(): # Check if unoserver even exists def unoStart(): unoserverPath = unoCheck() if unoserverPath: - retval = 1 - while retval != 0: - subprocess.Popen(args=[unoserverPath, "--daemon"]) + while True: + process = subprocess.Popen(args=[unoserverPath, "--daemon"]) + retval = process.wait() + if retval == 0: + break + time.sleep(1) else: return