HTTPServer: fix possible NullReference, fix Pool.Stop() call

master
Harald Wolff 2019-10-11 12:38:07 +02:00
parent 996d949096
commit 7bd7e4f8d6
1 changed files with 3 additions and 2 deletions

View File

@ -104,9 +104,10 @@ namespace ln.http
}
foreach (HTTPServerConnection connection in HTTPServerConnection.CurrentConnections)
connection.Abort();
connection?.Abort();
threadPool.Stop(true);
if (threadPool.State == PoolState.RUN)
threadPool.Stop(true);
}
private void AcceptConnections(TcpListener tcpListener)