Skip to content

Commit

Permalink
fix(exporter): apply timeout on relay data retrieval calls (#975)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbitfly authored Oct 17, 2024
1 parent 5c9b50e commit e715e8b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions backend/pkg/exporter/modules/relays.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ func fetchDeliveredPayloads(r types.Relay, offset uint64) ([]BidTrace, error) {
if offset != 0 {
url += fmt.Sprintf("&cursor=%v", offset)
}

//nolint:gosec
resp, err := http.Get(url)
client := &http.Client{
Timeout: time.Second * 30,
}
resp, err := client.Get(url)

if err != nil {
log.Error(err, "error retrieving delivered payloads", 0, map[string]interface{}{"relay": r.ID})
Expand Down

0 comments on commit e715e8b

Please sign in to comment.