Browse Source

Catch IOException in the proxy (#109)

* Catch IOException in the proxy

* Fixed usings
pull/112/head
David Fowler 6 years ago
committed by GitHub
parent
commit
a1322df057
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/Tye.Hosting/ProxyService.cs

6
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)

Loading…
Cancel
Save