From b0e64deb2797d0811cc7b8506ea1d9f774fb9cdd Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sun, 7 Nov 2021 17:47:18 +0100 Subject: [PATCH] rclone: Fix timeout calculation --- internal/backend/rclone/backend.go | 2 +- internal/backend/rclone/config.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/backend/rclone/backend.go b/internal/backend/rclone/backend.go index 52cd87f8c..8c1305f7f 100644 --- a/internal/backend/rclone/backend.go +++ b/internal/backend/rclone/backend.go @@ -222,7 +222,7 @@ func newBackend(cfg Config, lim limiter.Limiter) (*Backend, error) { // send an HTTP request to the base URL, see if the server is there client := &http.Client{ Transport: debug.RoundTripper(tr), - Timeout: cfg.Timeout * 60 * time.Second, + Timeout: cfg.Timeout, } // request a random file which does not exist. we just want to test when diff --git a/internal/backend/rclone/config.go b/internal/backend/rclone/config.go index 7b2b23efd..f8dc0d84d 100644 --- a/internal/backend/rclone/config.go +++ b/internal/backend/rclone/config.go @@ -21,7 +21,7 @@ var defaultConfig = Config{ Program: "rclone", Args: "serve restic --stdio --b2-hard-delete", Connections: 5, - Timeout: "1m", + Timeout: time.Minute, } func init() {