diff --git a/HTTPServer.cs b/HTTPServer.cs index d144d5f..80796ed 100644 --- a/HTTPServer.cs +++ b/HTTPServer.cs @@ -22,7 +22,7 @@ namespace ln.http public SessionCache SessionCache { get; set; } - public bool IsRunning => (currentListenerThreads.Count > 0) || (threadPool.NumThreads > 0); + public bool IsRunning => (currentListenerThreads.Count > 0) || (threadPool.CurrentPoolSize > 0); @@ -88,7 +88,7 @@ namespace ln.http tcpListener.Stop(); } - threadPool.NumThreads = 0; + threadPool.Close(); while (IsRunning) {