fix: change tokio::sync::Notify to tokio_util::sync::CancellationToken

This commit is contained in:
Jun Kurihara 2024-07-26 20:58:00 +09:00
commit 0950fdbd15
No known key found for this signature in database
GPG key ID: D992B3E3DE1DED23
8 changed files with 22 additions and 18 deletions

View file

@ -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);
}
}