Merge pull request #12 from drone/param-name-fix

Fixed parameter names in client retry func
pull/13/head
Marko Gaćeša 3 years ago committed by GitHub
commit 2f5cff3ba9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -201,9 +201,9 @@ func (p *HTTPClient) Upload(ctx context.Context, step int64, lines []*drone.Line
return err
}
func (p *HTTPClient) retry(ctx context.Context, method, path string, in, out interface{}) (*http.Response, error) {
func (p *HTTPClient) retry(ctx context.Context, path, method string, in, out interface{}) (*http.Response, error) {
for {
res, err := p.do(ctx, method, path, in, out)
res, err := p.do(ctx, path, method, in, out)
// do not retry on Canceled or DeadlineExceeded
if err := ctx.Err(); err != nil {
p.logger().Tracef("http: context canceled")

Loading…
Cancel
Save