From f232383c36281bc2a70a04175f99abb00913343d Mon Sep 17 00:00:00 2001 From: Ice3man543 Date: Sun, 1 Nov 2020 21:37:36 +0530 Subject: [PATCH] Fixed panic with dialer --- v2/internal/runner/processor.go | 2 +- v2/pkg/executer/executer_http.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/v2/internal/runner/processor.go b/v2/internal/runner/processor.go index 708fdeab..a9376f3b 100644 --- a/v2/internal/runner/processor.go +++ b/v2/internal/runner/processor.go @@ -72,7 +72,7 @@ func (r *Runner) processTemplateWithList(p *progress.Progress, template *templat Decolorizer: r.decolorizer, StopAtFirstMatch: r.options.StopAtFirstMatch, PF: r.pf, - Dialer: &r.dialer, + Dialer: r.dialer, }) } diff --git a/v2/pkg/executer/executer_http.go b/v2/pkg/executer/executer_http.go index b768f451..01210e2f 100644 --- a/v2/pkg/executer/executer_http.go +++ b/v2/pkg/executer/executer_http.go @@ -89,7 +89,7 @@ type HTTPOptions struct { ColoredOutput bool StopAtFirstMatch bool PF *projetctfile.ProjectFile - Dialer *cache.DialerFunc + Dialer cache.DialerFunc } // NewHTTPExecuter creates a new HTTP executer from a template @@ -598,7 +598,7 @@ func makeHTTPClient(proxyURL *url.URL, options *HTTPOptions) (*retryablehttp.Cli maxRedirects := options.BulkHTTPRequest.MaxRedirects transport := &http.Transport{ - DialContext: *options.Dialer, + DialContext: options.Dialer, MaxIdleConns: maxIdleConns, MaxIdleConnsPerHost: maxIdleConnsPerHost, MaxConnsPerHost: maxConnsPerHost,