Skip to content

Commit b2b48ac

Browse files
committed
Removed hardcoded value for http.StatusCreated
1 parent cb176a8 commit b2b48ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

receiver/splunkenterprisereceiver/scraper.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,9 +1915,9 @@ func (s *splunkScraper) scrapeSearch(_ context.Context, now pcommon.Timestamp, i
19151915

19161916
// if no errors and 200 returned scrape was successful, return. Note we must make sure that
19171917
// the 200 is coming after the first request which provides a jobId to retrieve results
1918-
if sr.Return == 201 && sr.Jobid != nil {
1918+
if sr.Return == http.StatusCreated && sr.Jobid != nil {
19191919
break
1920-
} else if sr.Return == 201 && sr.Jobid == nil {
1920+
} else if sr.Return == http.StatusCreated && sr.Jobid == nil {
19211921
time.Sleep(2 * time.Second)
19221922
}
19231923

0 commit comments

Comments
 (0)