mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
nfsmount: fix exit after external unmount #7503
Before this change, if a user unmounted externally (for example, via the Finder UI), rclone would not be aware of this and wait forever to exit -- effectively causing a deadlock that would require Ctrl+C to terminate. After this change, when the handler detects an external unmount, it calls a function which allows rclone to cleanly shutdown the VFS and exit.
This commit is contained in:
@@ -16,10 +16,11 @@ import (
|
||||
|
||||
// Server contains everything to run the Server
|
||||
type Server struct {
|
||||
opt Options
|
||||
handler nfs.Handler
|
||||
ctx context.Context // for global config
|
||||
listener net.Listener
|
||||
opt Options
|
||||
handler nfs.Handler
|
||||
ctx context.Context // for global config
|
||||
listener net.Listener
|
||||
UnmountedExternally bool
|
||||
}
|
||||
|
||||
// NewServer creates a new server
|
||||
|
||||
Reference in New Issue
Block a user