Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gracefully close socket on shutdown #81

Open
NfNitLoop opened this issue Mar 18, 2022 · 1 comment
Open

Gracefully close socket on shutdown #81

NfNitLoop opened this issue Mar 18, 2022 · 1 comment

Comments

@NfNitLoop
Copy link
Owner

I'm (somewhat hackily) just running FeoBlog in a terminal window. To shut it down, I press Ctrl-C. It seems that just forces Actix-Web to exit its event loop and end the program. If I try to restart the process, for a minute or so it can't start because the port is still "in use".

Probably need to have it gracefully close the socket on shutdown. I remember this being a thing that wasn't yet implemented in Tide. Hopefully Actix-Web has a better story here.

Oddly, I don't remember this being an issue when developing in Windows.

@NfNitLoop
Copy link
Owner Author

Oddly, I don't remember this being an issue when developing in Windows.

Possibly because the default behavior in Windows is to allow other processes to yoink the port away from your application. IIRC I changed this behavior at some point. So yeah, should implement graceful shutdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant