Merge branch 'develop' into enhancement/add-username-to-tray-info

This commit is contained in:
Jakub Trllo 2024-07-24 17:46:06 +02:00 committed by GitHub
commit 6cd69e6126
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -124,6 +124,11 @@ def _wait_for_starting_tray(
if data.get("started") is True:
return data
pid = data.get("pid")
if pid and not _is_process_running(pid):
remove_tray_server_url()
return None
if time.time() - started_at > timeout:
return None
time.sleep(0.1)
@ -276,7 +281,12 @@ def remove_tray_server_url(force: Optional[bool] = False):
except BaseException:
data = {}
if force or not data or data.get("pid") == os.getpid():
if (
force
or not data
or data.get("pid") == os.getpid()
or not _is_process_running(data.get("pid"))
):
os.remove(filepath)