Skip to content

Commit

Permalink
Merge pull request #94 from Sherlock-Holo/fix-mount-handle
Browse files Browse the repository at this point in the history
fix: MountHandle cause panic
  • Loading branch information
Sherlock-Holo authored May 7, 2024
2 parents 1108af9 + 548c938 commit e26837c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/raw/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ impl MountHandle {
impl Drop for MountHandle {
fn drop(&mut self) {
if let Some(inner) = self.inner.take() {
if inner.task.is_finished() {
return;
}

#[cfg(all(not(feature = "tokio-runtime"), feature = "async-io-runtime"))]
{
task::spawn(inner.inner_unmount()).detach();
Expand Down

0 comments on commit e26837c

Please sign in to comment.