From a1322df0575ce9207f0d3fdcdfbee9aaa0d15937 Mon Sep 17 00:00:00 2001 From: David Fowler Date: Sun, 15 Mar 2020 14:40:42 -0700 Subject: [PATCH] Catch IOException in the proxy (#109) * Catch IOException in the proxy * Fixed usings --- src/Tye.Hosting/ProxyService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Tye.Hosting/ProxyService.cs b/src/Tye.Hosting/ProxyService.cs index a8e29950..777dd005 100644 --- a/src/Tye.Hosting/ProxyService.cs +++ b/src/Tye.Hosting/ProxyService.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; +using System.IO; using System.IO.Pipelines; using System.Linq; using System.Net; @@ -11,7 +12,6 @@ using System.Net.Sockets; using System.Threading; using System.Threading.Tasks; using Bedrock.Framework; -using Tye.Hosting.Model; using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Connections.Features; using Microsoft.AspNetCore.Hosting; @@ -153,6 +153,10 @@ namespace Tye.Hosting { // Connection was reset } + catch (IOException) + { + // Reset can also appear as an IOException with an inner SocketException + } catch (OperationCanceledException ex) { if (!notificationFeature.ConnectionClosedRequested.IsCancellationRequested)