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 {