mirror of
https://github.com/rclone/rclone.git
synced 2025-12-12 06:24:14 +01:00
backend: fs implements the Shutdowner interface
Since `tokenRenewer` adds a Shutdown method, we should call it to clean up resources. changes backends: onedrive,box,pcloud,amazonclouddrive,hidrive,jottacloud,sharefile ,premiumizeme Signed-off-by: rkonfj <rkonfj@gmail.com>
This commit is contained in:
@@ -1207,6 +1207,12 @@ func (f *Fs) CleanUp(ctx context.Context) (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
// Shutdown shutdown the fs
|
||||
func (f *Fs) Shutdown(ctx context.Context) error {
|
||||
f.tokenRenewer.Shutdown()
|
||||
return nil
|
||||
}
|
||||
|
||||
// ChangeNotify calls the passed function with a path that has had changes.
|
||||
// If the implementation uses polling, it should adhere to the given interval.
|
||||
//
|
||||
@@ -1719,6 +1725,7 @@ var (
|
||||
_ fs.DirCacheFlusher = (*Fs)(nil)
|
||||
_ fs.PublicLinker = (*Fs)(nil)
|
||||
_ fs.CleanUpper = (*Fs)(nil)
|
||||
_ fs.Shutdowner = (*Fs)(nil)
|
||||
_ fs.Object = (*Object)(nil)
|
||||
_ fs.IDer = (*Object)(nil)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user