-
Notifications
You must be signed in to change notification settings - Fork 6
Grace shutdown #28
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
Grace shutdown #28
Conversation
miky-rola
commented
Apr 11, 2025
- Add function to shutdown server without any dependencies
|
Amazing job! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its a great job , but a couple of request.
first we can move this methods and mods about the graceful shutdown to a mod in
maybe src/utils.rs or its own.
For the unix implementation its better to finally use libc
that will reduce it to something more like the windows one
extern "C" fn handle_sigint(_: i32) {
println!("\SIGINT recibed (Ctrl+C). Quiting...");
std::process::exit(0);
}
unsafe {
libc::signal(libc::SIGINT, handle_sigint as usize);
}* add basic http request validations * Update .gitignore * Prevent overload the server with infinite o malformed headers * Fix parsing errors and bugs - Now the headers have a maximum (100). - The body read function now will not consume excessive RAM for a malformed request. - Fix keep-alive detection.
…tion and accessibility 🦜🕺 (Az107#32)
Az107
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM