From 60a5c35de9c1d76bb73b4604fc03d85d6c4cea74 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Fri, 10 Apr 2020 12:13:12 +0200 Subject: [PATCH] rclone: close connection to rclone if open fails --- internal/backend/rclone/backend.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/backend/rclone/backend.go b/internal/backend/rclone/backend.go index c87a2f1b0..2e9887bc4 100644 --- a/internal/backend/rclone/backend.go +++ b/internal/backend/rclone/backend.go @@ -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 }