mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +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:
@@ -1377,6 +1377,12 @@ func (f *Fs) ListR(ctx context.Context, dir string, callback fs.ListRCallback) (
|
||||
|
||||
}
|
||||
|
||||
// Shutdown shutdown the fs
|
||||
func (f *Fs) Shutdown(ctx context.Context) error {
|
||||
f.tokenRenewer.Shutdown()
|
||||
return nil
|
||||
}
|
||||
|
||||
// Creates from the parameters passed in a half finished Object which
|
||||
// must have setMetaData called on it
|
||||
//
|
||||
@@ -2755,6 +2761,7 @@ var (
|
||||
_ fs.PublicLinker = (*Fs)(nil)
|
||||
_ fs.CleanUpper = (*Fs)(nil)
|
||||
_ fs.ListRer = (*Fs)(nil)
|
||||
_ fs.Shutdowner = (*Fs)(nil)
|
||||
_ fs.Object = (*Object)(nil)
|
||||
_ fs.MimeTyper = &Object{}
|
||||
_ fs.IDer = &Object{}
|
||||
|
||||
Reference in New Issue
Block a user