mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
fix: Steam can restart more than twice in a session (#754)
* fix: Steam can restart more than twice in a session Every exit 42 counted toward the cap that stops an update which will not install, and the count was never cleared, so the third restart of a session ended it however far apart they were. A client that ran for a minute before asking is not that loop: the count starts again. * fix: measure the client's run time as it exits The time spent collecting logs and checking FEX after the client exits counted toward its run, so a slow cleanup could make a quick exit 42 look like a long one and clear the count. --------- Co-authored-by: Kirk <12691869+KirkPatrickJunsay@users.noreply.github.com> Co-authored-by: Kurt Himebauch <136133082+xXJSONDeruloXx@users.noreply.github.com>
This commit is contained in:
1 parent
704e95edb3
commit
8f4e0ac011
2 files changed
+43
-2
No files matched your search
@@ -56,6 +56,12 @@ clear_stale_tmp() {
|
||||
}
|
||||
[ -z "${BL_INSIDE:-}" ] && clear_stale_tmp
|
||||
|
||||
steam_update_stuck() {
|
||||
[ "$1" -lt 60 ] || steam_updates=0
|
||||
steam_updates=$((steam_updates + 1))
|
||||
[ "$steam_updates" -ge 3 ]
|
||||
}
|
||||
|
||||
collect_steam_logs() {
|
||||
[ -n "${BL_DEBUG_DIR:-}" ] || return 0
|
||||
local steam_root=${XDG_DATA_HOME:-$HOME/.local/share}/Steam
|
||||
@@ -839,9 +845,11 @@ BUSCONF
|
||||
/usr/local/bin/droiddeck-steam-desktop-ui &
|
||||
desktop_ui_pid=$!
|
||||
fi
|
||||
steam_started=$SECONDS
|
||||
"$steam_root/steamrtarm64/steam" "${_bl_ui[@]}" "${_bl_cdp[@]}" "${_bl_lang[@]}" -clientbeta "$steam_channel" \
|
||||
-no-cef-sandbox -cef-ozone-platform=x11 "${_bl_cef[@]}" "$@"
|
||||
rc=$?
|
||||
steam_ran=$((SECONDS - steam_started))
|
||||
if [ -n "$desktop_ui_pid" ]; then
|
||||
kill "$desktop_ui_pid" 2>/dev/null || true
|
||||
wait "$desktop_ui_pid" 2>/dev/null || true
|
||||
@@ -876,8 +884,7 @@ BUSCONF
|
||||
continue
|
||||
fi
|
||||
[ "$rc" -eq 42 ] || break
|
||||
steam_updates=$((steam_updates + 1))
|
||||
if [ "$steam_updates" -ge 3 ]; then
|
||||
if steam_update_stuck "$steam_ran"; then
|
||||
echo "== steam: asked to restart for an update $steam_updates times and it is not installing; the session stops here rather than loop"
|
||||
break
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user