Skip to content

Commit

Permalink
fix: shutdown_hook not send
Browse files Browse the repository at this point in the history
  • Loading branch information
Millione committed Oct 31, 2023
1 parent 25885a7 commit 807a58c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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

0 comments on commit 807a58c

Please sign in to comment.