Skip to content

Commit

Permalink
fix: inotify panic
Browse files Browse the repository at this point in the history
  • Loading branch information
Itsusinn committed Dec 21, 2024
1 parent 16bad65 commit f615eff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tuic-server/src/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl CertResolver {
}

async fn start_watch(&self) -> eyre::Result<()> {
let (mut watcher, mut rx) = utils::async_watcher()?;
let (mut watcher, mut rx) = utils::async_watcher().await?;

watcher.watch(self.cert_path.as_ref(), RecursiveMode::NonRecursive)?;

Expand Down
3 changes: 2 additions & 1 deletion tuic-server/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ where
}
}

pub fn async_watcher() -> notify::Result<(RecommendedWatcher, Receiver<notify::Result<Event>>)> {
pub async fn async_watcher() -> notify::Result<(RecommendedWatcher, Receiver<notify::Result<Event>>)>
{
let (tx, rx) = channel(1);

let watcher = RecommendedWatcher::new(
Expand Down

0 comments on commit f615eff

Please sign in to comment.