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

Signal handling #185

Open
rvolosatovs opened this issue Jun 16, 2022 · 0 comments
Open

Signal handling #185

rvolosatovs opened this issue Jun 16, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@rvolosatovs
Copy link
Member

rvolosatovs commented Jun 16, 2022

The server should listen on signals and gracefully shutdown and exit on appropriate signals.
Seems like we should be able to use https://docs.rs/signal-hook-async-std/latest/signal_hook_async_std/ for this.

Similarly to https://github.com/profianinc/drawbridge/blob/e84c7efcdafd97361b1fc0fc8acb26fa941733b8/tests/mod.rs#L37-L44 we should add a take_until to https://github.com/profianinc/drawbridge/blob/e84c7efcdafd97361b1fc0fc8acb26fa941733b8/src/main.rs#L69-L73, which should be passed a future, which is ready once a termination signal (probably SIGKILL and/or SIGTERM, please double-check what is applicable) is received.

@rvolosatovs rvolosatovs added enhancement New feature or request blocked and removed blocked labels Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant