Hopefully catch failed connections

This commit is contained in:
Mike Nolan 2022-05-03 13:56:14 -05:00
parent 7886cc120c
commit 2aed769ac7
2 changed files with 8 additions and 3 deletions

View File

@ -5,9 +5,9 @@
<PackageId>Tesses.WebServer</PackageId>
<Author>Mike Nolan</Author>
<Company>Tesses</Company>
<Version>1.0.3.0</Version>
<AssemblyVersion>1.0.3.0</AssemblyVersion>
<FileVersion>1.0.3.0</FileVersion>
<Version>1.0.3.1</Version>
<AssemblyVersion>1.0.3.1</AssemblyVersion>
<FileVersion>1.0.3.1</FileVersion>
<Description>A TCP Listener HTTP(s) Server</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageTags>HTTP, WebServer, Website</PackageTags>

View File

@ -872,8 +872,13 @@ namespace Tesses.WebServer
using (var r = token.Register(() => _listener.Stop())) {
while (!token.IsCancellationRequested)
{
try{
var socket=await _listener.AcceptTcpClientAsync();
await CommunicateHostAsync(socket).ConfigureAwait(false);
}catch(Exception ex)
{
_=ex;
}
}
}
}