mirror of
https://github.com/rclone/rclone.git
synced 2025-12-31 07:33:33 +00:00
mount: notice daemon dying much quicker
Before this change we waited until until the timeout to check the
daemon was alive.
Now we check it every 100ms like we do the mount status.
This also fixes compiling on all platforms which was broken by the
previous change
9bfbf2a4a mount: fix macOS not noticing errors with --daemon
See: https://forum.rclone.org/t/rclone-mount-daemon-exits-successfully-even-when-mount-fails/43146
This commit is contained in:
@@ -3,10 +3,6 @@
|
||||
|
||||
package mountlib
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// CheckMountEmpty checks if mountpoint folder is empty.
|
||||
// On non-Linux unixes we list directory to ensure that.
|
||||
func CheckMountEmpty(mountpoint string) error {
|
||||
@@ -19,9 +15,5 @@ func CheckMountReady(mountpoint string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// WaitMountReady should wait until mountpoint is mounted by rclone.
|
||||
// The check is implemented only for Linux so we just sleep a little.
|
||||
func WaitMountReady(mountpoint string, timeout time.Duration) error {
|
||||
time.Sleep(timeout)
|
||||
return nil
|
||||
}
|
||||
// CanCheckMountReady is set if CheckMountReady is functional
|
||||
var CanCheckMountReady = false
|
||||
|
||||
Reference in New Issue
Block a user