mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Avoid ASF crash in #1283
Won't solve the misconfiguration caused by the user, but ASF crash can be avoided at this stage.
This commit is contained in:
@@ -100,13 +100,14 @@ namespace ArchiSteamFarm.IPC {
|
|||||||
Logging.InitHistoryLogger();
|
Logging.InitHistoryLogger();
|
||||||
|
|
||||||
// Start the server
|
// Start the server
|
||||||
IWebHost kestrelWebHost = builder.Build();
|
IWebHost kestrelWebHost = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
kestrelWebHost = builder.Build();
|
||||||
await kestrelWebHost.StartAsync().ConfigureAwait(false);
|
await kestrelWebHost.StartAsync().ConfigureAwait(false);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
ASF.ArchiLogger.LogGenericException(e);
|
ASF.ArchiLogger.LogGenericException(e);
|
||||||
kestrelWebHost.Dispose();
|
kestrelWebHost?.Dispose();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user