Skip to content

Commit

Permalink
Merge pull request #90 from kvaster/kill-stale
Browse files Browse the repository at this point in the history
Make sure we'll have no stale mount after process kill
  • Loading branch information
chrislusf authored Sep 26, 2022
2 parents 4cec4e5 + 7387e6b commit e8c336d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/driver/mounter.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ func fuseMount(path string, command string, args []string) (Unmounter, error) {
glog.Infof("weed mount exit, pid: %d, path: %v", cmd.Process.Pid, path)
}

// make sure we'll have no stale mounts
time.Sleep(time.Millisecond * 100)
_ = mount.New("").Unmount(path)

close(fu.finished)
}()

Expand Down

0 comments on commit e8c336d

Please sign in to comment.