diff --git a/v2/pkg/executer/executer_http.go b/v2/pkg/executer/executer_http.go index 216a0625..03167276 100644 --- a/v2/pkg/executer/executer_http.go +++ b/v2/pkg/executer/executer_http.go @@ -106,6 +106,11 @@ func (e *HTTPExecuter) ExecuteHTTP(p *progress.Progress, URL string) (result Res result.Extractions = make(map[string]interface{}) dynamicvalues := make(map[string]interface{}) + // verify if the URL is already being processed + if e.bulkHttpRequest.HasGenerator(URL) { + return + } + remaining := e.template.GetHTTPRequestsCount() e.bulkHttpRequest.CreateGenerator(URL) diff --git a/v2/pkg/requests/bulk-http-request.go b/v2/pkg/requests/bulk-http-request.go index d5ac5363..2e5cbe20 100644 --- a/v2/pkg/requests/bulk-http-request.go +++ b/v2/pkg/requests/bulk-http-request.go @@ -128,6 +128,10 @@ func (r *BulkHTTPRequest) CreateGenerator(URL string) { r.gsfm.Add(URL) } +func (r *BulkHTTPRequest) HasGenerator(URL string) bool { + return r.gsfm.Has(URL) +} + func (r *BulkHTTPRequest) ReadOne(URL string) { r.gsfm.ReadOne(URL) }