From 66597aed46ac2830ef7e0415673ebe8644cfa9ae Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Thu, 15 Feb 2018 16:17:27 +0900 Subject: [PATCH] hide websocket exceptions --- BTCPayServer/BTCPayServer.csproj | 2 +- BTCPayServer/Hosting/BTCpayMiddleware.cs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/BTCPayServer/BTCPayServer.csproj b/BTCPayServer/BTCPayServer.csproj index 9e5e6abc9..a34869864 100644 --- a/BTCPayServer/BTCPayServer.csproj +++ b/BTCPayServer/BTCPayServer.csproj @@ -2,7 +2,7 @@ Exe netcoreapp2.0 - 1.0.1.30 + 1.0.1.31 NU1701 diff --git a/BTCPayServer/Hosting/BTCpayMiddleware.cs b/BTCPayServer/Hosting/BTCpayMiddleware.cs index 32571930f..dadbebf8f 100644 --- a/BTCPayServer/Hosting/BTCpayMiddleware.cs +++ b/BTCPayServer/Hosting/BTCpayMiddleware.cs @@ -22,6 +22,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Routing; using Microsoft.AspNetCore.Http.Extensions; using BTCPayServer.Controllers; +using System.Net.WebSockets; namespace BTCPayServer.Hosting { @@ -82,6 +83,8 @@ namespace BTCPayServer.Hosting { await _Next(httpContext); } + catch (WebSocketException) + { } catch (UnauthorizedAccessException ex) { await HandleBitpayHttpException(httpContext, new BitpayHttpException(401, ex.Message));