From 79a9f97157f4118725acd90f15acf7db0758617a Mon Sep 17 00:00:00 2001 From: JustArchi Date: Wed, 16 Dec 2020 12:11:21 +0100 Subject: [PATCH] Add two more exceptions to NLogGet Even with cancellation token, it seems that it's not always possible to abort the connection in the clean way, pointless to throw on them since there is nothing else we can do. --- ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs b/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs index f00f844fe..2ffc9494f 100644 --- a/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs +++ b/ArchiSteamFarm/IPC/Controllers/Api/NLogController.cs @@ -32,6 +32,7 @@ using System.Threading.Tasks; using ArchiSteamFarm.IPC.Responses; using ArchiSteamFarm.Localization; using ArchiSteamFarm.NLog; +using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; @@ -97,7 +98,9 @@ namespace ArchiSteamFarm.IPC.Controllers.Api { closedSemaphore.Dispose(); } } - } catch (TaskCanceledException e) { + } catch (ConnectionAbortedException e) { + ASF.ArchiLogger.LogGenericDebuggingException(e); + } catch (OperationCanceledException e) { ASF.ArchiLogger.LogGenericDebuggingException(e); } catch (WebSocketException e) { ASF.ArchiLogger.LogGenericDebuggingException(e);