From e0b5a13a13f2090d8f39d8f11bf5059407ef8738 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 20 Dec 2020 16:29:57 +0000 Subject: [PATCH] jottacloud: fix token renewer to fix long uploads See: https://forum.rclone.org/t/jottacloud-crypt-3-gb-copy-runs-for-a-week-without-completing/21173 --- backend/jottacloud/jottacloud.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/jottacloud/jottacloud.go b/backend/jottacloud/jottacloud.go index 5e428aec6..1c6ced368 100644 --- a/backend/jottacloud/jottacloud.go +++ b/backend/jottacloud/jottacloud.go @@ -1463,6 +1463,8 @@ func readMD5(in io.Reader, size, threshold int64) (md5sum string, out io.Reader, // // The new object may have been created if an error is returned func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, options ...fs.OpenOption) (err error) { + o.fs.tokenRenewer.Start() + defer o.fs.tokenRenewer.Stop() size := src.Size() md5String, err := src.Hash(ctx, hash.MD5) if err != nil || md5String == "" {