diff --git a/handlers/health.go b/handlers/health.go index f193544..1d6d3c5 100644 --- a/handlers/health.go +++ b/handlers/health.go @@ -19,7 +19,11 @@ func GetHealth(c echo.Context) error { bottinApiProtocol := viper.GetString("bottin.api.protocol") bottinApiPort := viper.GetInt("bottin.api.port") + bottinClient := http.DefaultClient + defer bottinClient.CloseIdleConnections() + bottinConnection := bottindata.NewApiClient( + bottinClient, bottinApiKey, bottinApiHost, bottinApiProtocol, diff --git a/handlers/transaction.go b/handlers/transaction.go index c6c6a15..946f6c8 100644 --- a/handlers/transaction.go +++ b/handlers/transaction.go @@ -80,8 +80,12 @@ func PostTransactions(c echo.Context) error { bottinApiProtocol := viper.GetString("bottin.api.protocol") bottinApiPort := viper.GetInt("bottin.api.port") + bottinClient := http.DefaultClient + defer bottinClient.CloseIdleConnections() + // Using bottin's API client bottinApiClient := bottindata.NewApiClient( + bottinClient, bottinApiKey, bottinApiHost, bottinApiProtocol,