mirror of
https://github.com/rclone/rclone.git
synced 2025-01-09 07:48:19 +01:00
ftp: fix deadlock after failed update when concurrency=1
This commit is contained in:
parent
bb0c4ad2d8
commit
69f4b48719
@ -1062,8 +1062,9 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
|
|||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
_ = c.Quit() // toss this connection to avoid sync errors
|
_ = c.Quit() // toss this connection to avoid sync errors
|
||||||
remove()
|
// recycle connection in advance to let remove() find free token
|
||||||
o.fs.putFtpConnection(nil, err)
|
o.fs.putFtpConnection(nil, err)
|
||||||
|
remove()
|
||||||
return errors.Wrap(err, "update stor")
|
return errors.Wrap(err, "update stor")
|
||||||
}
|
}
|
||||||
o.fs.putFtpConnection(&c, nil)
|
o.fs.putFtpConnection(&c, nil)
|
||||||
|
Loading…
Reference in New Issue
Block a user