rclone: close connection to rclone if open fails

This commit is contained in:
Michael Eischer 2020-04-10 12:13:12 +02:00
parent 9333f707fa
commit 60a5c35de9
1 changed files with 1 additions and 0 deletions

View File

@ -267,6 +267,7 @@ func Open(cfg Config, lim limiter.Limiter) (*Backend, error) {
restBackend, err := rest.Open(restConfig, debug.RoundTripper(be.tr))
if err != nil {
_ = be.Close()
return nil, err
}