Skip to content

Commit 2b006ea

Browse files
committed
Fix deadlock when stopping or restarting steam
1 parent 4eaae11 commit 2b006ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

steam_acolyte/steam_linux.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def wait_for_steam_exit(self):
145145
# non-child processes, and the alternatives using the ptrace, inotifyd
146146
# or netlink interfaces are much more involved.
147147
pid = self._read_steam_pid()
148-
while is_process_running(pid):
148+
while pid and is_process_running(pid):
149149
sleep(0.010)
150150

151151
@trace.method

steam_acolyte/steam_win32.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def set_last_user(self, username):
7878
@trace.method
7979
def _is_steam_pid_valid(self):
8080
pid = reg.QueryValueEx(self._ipc_key, 'SteamPID')[0]
81-
return pid != 0 and is_process_running(pid)
81+
return pid and is_process_running(pid)
8282

8383
@trace.method
8484
def _set_steam_pid(self):

0 commit comments

Comments
 (0)