From 6a331a69cf3f8bc1b93a96de5ce8505beaf430fa Mon Sep 17 00:00:00 2001 From: Petr Vobornik Date: Mon, 26 Aug 2024 15:13:20 +0200 Subject: [PATCH] fix: timeout duration of Pendo client The timeout was not using correct duration unit as default is Nanosecond. So when used with defaults, the request almost immediately timed out. Signed-off-by: Petr Vobornik --- internal/usecase/client/pendo/pendo_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/usecase/client/pendo/pendo_client.go b/internal/usecase/client/pendo/pendo_client.go index d9259c34..0a1216b4 100644 --- a/internal/usecase/client/pendo/pendo_client.go +++ b/internal/usecase/client/pendo/pendo_client.go @@ -158,7 +158,7 @@ func newClient(cfg *config.Config) *pendoClient { cfg.Clients.PendoRequestTimeoutSecs = 3 } client := &http.Client{ - Timeout: time.Duration(cfg.Clients.PendoRequestTimeoutSecs), + Timeout: time.Duration(cfg.Clients.PendoRequestTimeoutSecs) * time.Second, } return &pendoClient{ Config: cfg,