Hopefully catch failed connections
This commit is contained in:
parent
7886cc120c
commit
2aed769ac7
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue