fix: change tokio::sync::Notify to tokio_util::sync::CancellationToken
This commit is contained in:
parent
6b3a4d5eaa
commit
0950fdbd15
8 changed files with 22 additions and 18 deletions
|
|
@ -312,13 +312,13 @@ where
|
|||
}
|
||||
};
|
||||
|
||||
match &self.globals.term_notify {
|
||||
Some(term) => {
|
||||
match &self.globals.cancel_token {
|
||||
Some(cancel_token) => {
|
||||
select! {
|
||||
_ = proxy_service.fuse() => {
|
||||
warn!("Proxy service got down");
|
||||
}
|
||||
_ = term.notified().fuse() => {
|
||||
_ = cancel_token.cancelled().fuse() => {
|
||||
info!("Proxy service listening on {} receives term signal", self.listening_on);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue