From a295c85edc27a0ca868a3e6aced95af63e57ee33 Mon Sep 17 00:00:00 2001 From: JacksonTheMaster <81807824+JacksonTheMaster@users.noreply.github.com> Date: Sat, 13 Sep 2025 02:14:52 +0200 Subject: [PATCH] fix deadlock when AutoUpdating --- src/steamcmd/getappinfo.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/steamcmd/getappinfo.go b/src/steamcmd/getappinfo.go index 0d592c7d..ba6c6f89 100644 --- a/src/steamcmd/getappinfo.go +++ b/src/steamcmd/getappinfo.go @@ -73,8 +73,6 @@ func getAppInfo() error { steamMu.Lock() // Block until steamMu becomes available, then snack it and lock it again logger.Core.Debug("🔄 Locking SteamMu for SteamCMD AppInfo...") } - defer steamMu.Unlock() - defer logger.Core.Debug("🔄 Unlocking SteamMu after SteamCMD AppInfo...") steamcmddir := SteamCMDLinuxDir executable := "steamcmd.sh" appid := config.GetGameServerAppID() @@ -109,6 +107,9 @@ func getAppInfo() error { return fmt.Errorf("failed to run SteamCMD app info: %w", err) } + steamMu.Unlock() + logger.Core.Debug("🔄 Unlocking SteamMu after SteamCMD AppInfo...") + // Extract branches and build IDs newBranches, err := extractBranches(stdout.String()) if err != nil {