Skip to content

Commit

Permalink
Pass timeout as stringified time.Duration instead of millisecond value
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwoodward committed Apr 16, 2022
1 parent b79bd10 commit d77a7ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/prometheus/v1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -840,9 +840,9 @@ func (h *httpAPI) Query(ctx context.Context, query string, ts time.Time, opts ..
o(opt)
}

d := opt.timeout.Milliseconds()
if t > 0 {
q.Set("timeout", t.String())
d := opt.timeout
if d > 0 {
q.Set("timeout", d.String())
}

q.Set("query", query)
Expand Down

0 comments on commit d77a7ea

Please sign in to comment.