dotnet / WatsonWebserver

Watson is the fastest, easiest way to build scalable RESTful web servers and services in C#.
MIT License
411 stars 84 forks source link

Server never comes back after stop (.NET Core 3.1) #77

Closed deathbull closed 2 years ago

deathbull commented 2 years ago

I tested Test.Default project and as i saw in .net 5 there is no problem it can stop and start immediatly, but in .net core 3.1 it just stopping and can not start again it gives error from AcceptConnections function

image

jchristn commented 2 years ago

Interesting. Thanks for finding this. Apparently the .Stop() method has different behaviors across frameworks. I've fixed it locally by adding _HttpListener = new HttpListener() to the Start methods, and will publish this as a new version momentarily.

jchristn commented 2 years ago

NuGet: https://www.nuget.org/packages/Watson/4.2.2.2 Commit: https://github.com/jchristn/WatsonWebserver/commit/b323a3087d2c21938ca90311d41842fb8ea67330

I really appreciate it @deathbull - hope you don't mind I added you to the README too!

deathbull commented 2 years ago

Thank you so much