diff --git a/HTTPServer.cs b/HTTPServer.cs index 8886b7d..ec33347 100644 --- a/HTTPServer.cs +++ b/HTTPServer.cs @@ -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)