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

fix: shutdown_hook not send #252

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion volo-thrift/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "volo-thrift"
version = "0.8.0"
version = "0.8.1"
edition.workspace = true
homepage.workspace = true
repository.workspace = true
Expand Down
4 changes: 2 additions & 2 deletions volo-thrift/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub struct Server<S, L, Req, MkC, SP> {
#[cfg(feature = "multiplex")]
multiplex: bool,
span_provider: SP,
shutdown_hooks: Vec<Box<dyn FnOnce() -> BoxFuture<'static, ()>>>,
shutdown_hooks: Vec<Box<dyn FnOnce() -> BoxFuture<'static, ()> + Send>>,
_marker: PhantomData<Req>,
}

Expand Down Expand Up @@ -81,7 +81,7 @@ impl<S, L, Req, MkC, SP> Server<S, L, Req, MkC, SP> {
/// in reverse order of registration.
pub fn register_shutdown_hook(
mut self,
hook: impl FnOnce() -> BoxFuture<'static, ()> + 'static,
hook: impl FnOnce() -> BoxFuture<'static, ()> + 'static + Send,
) -> Self {
self.shutdown_hooks.push(Box::new(hook));
self
Expand Down
Loading