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

shutdown_timeout setter on HttpServer #716

Open
gh0st-work opened this issue Oct 8, 2023 · 1 comment
Open

shutdown_timeout setter on HttpServer #716

gh0st-work opened this issue Oct 8, 2023 · 1 comment

Comments

@gh0st-work
Copy link

gh0st-work commented Oct 8, 2023

There is pretty configurable param shutdown_timeout on HttpServer.builder, but pub setter on HttpServer struct/impl is missing.

Just need to copy from builder this pub method to HttpServer:

/// Workers still alive after the timeout are force dropped.
///
/// By default shutdown timeout sets to 30 seconds.
pub fn shutdown_timeout(mut self, secs: u64) -> Self {
    self.shutdown_timeout = Duration::from_secs(secs);
    self
}

And change self.shutdown_timeout to self.builder.shutdown_timeout ofc

Im not pretty sure about that (infrastructure is huge), so in format of issue. U can use this issue as a note)))

BTW, thx for the project

@fakeshadow
Copy link
Collaborator

Thanks for the issue. You are right the issue template is missing and your format is good.
As for the timeout API PR is welcomed.

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

2 participants