diff --git a/ln.http/HTTPServer.cs b/ln.http/HTTPServer.cs index c1c2fe8..f60efe5 100644 --- a/ln.http/HTTPServer.cs +++ b/ln.http/HTTPServer.cs @@ -4,6 +4,7 @@ using ln.logging; using ln.http.exceptions; using System.IO; using System.Text; +using System.Threading; using ln.protocols.helper; namespace ln.http @@ -35,8 +36,10 @@ namespace ln.http public void RemoveRouter(HttpRouter httpRouter) => RemoveRouter(httpRouter.Route); public void RemoveRouter(HttpRouterDelegate routerDelegate) => _routerDelegates.Remove(routerDelegate); - - public void Connection(HttpConnection httpConnection) + + public void Connection(HttpConnection httpConnection) => + ThreadPool.QueueUserWorkItem((state => ConnectionWorker(httpConnection))); + public void ConnectionWorker(HttpConnection httpConnection) { try { diff --git a/ln.http/ln.http.csproj b/ln.http/ln.http.csproj index 7936a67..dac0389 100644 --- a/ln.http/ln.http.csproj +++ b/ln.http/ln.http.csproj @@ -10,7 +10,7 @@ (c) 2020 Harald Wolff-Thobaben http server 9 - 0.5.3 + 0.6.1