From bec4dbad84c383017e333e839dde417b1a2edc6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Domeradzki?= Date: Mon, 5 Jan 2026 09:23:10 +0100 Subject: [PATCH] Do not crash on invalid IPC.config Log error and continue without IPC instead --- ArchiSteamFarm/IPC/ArchiKestrel.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ArchiSteamFarm/IPC/ArchiKestrel.cs b/ArchiSteamFarm/IPC/ArchiKestrel.cs index f2dade9bc..07448a4c5 100644 --- a/ArchiSteamFarm/IPC/ArchiKestrel.cs +++ b/ArchiSteamFarm/IPC/ArchiKestrel.cs @@ -534,15 +534,19 @@ internal static class ArchiKestrel { // Init history logger for /Api/Log usage Logging.InitHistoryLogger(); - WebApplication webApplication = await CreateWebApplication().ConfigureAwait(false); + WebApplication? webApplication = null; try { // Start the server + webApplication = await CreateWebApplication().ConfigureAwait(false); + await webApplication.StartAsync().ConfigureAwait(false); } catch (Exception e) { ASF.ArchiLogger.LogGenericException(e); - await webApplication.DisposeAsync().ConfigureAwait(false); + if (webApplication != null) { + await webApplication.DisposeAsync().ConfigureAwait(false); + } return; }