Do not crash on invalid IPC.config

Log error and continue without IPC instead
This commit is contained in:
Łukasz Domeradzki
2026-01-05 09:23:10 +01:00
parent 7e9b5ee163
commit bec4dbad84

View File

@@ -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;
}