Hopefully support multiple simultaneous connections

This commit is contained in:
Mike Nolan 2022-07-06 16:19:40 -05:00
parent 340c8ae946
commit 0b5eb9085c
2 changed files with 12 additions and 4 deletions

View File

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

View File

@ -874,7 +874,15 @@ namespace Tesses.WebServer
{
try{
var socket=await _listener.AcceptTcpClientAsync();
await CommunicateHostAsync(socket).ConfigureAwait(false);
Task.Factory.StartNew(async()=>{
try{
await CommunicateHostAsync(socket);
}catch(Exception ex)
{
_=ex;
}
}).Wait(0);
}catch(Exception ex)
{
_=ex;