mute httpsched debug logging
@@ -140,7 +140,9 @@ func (cli *client) httpDo(ctx context.Context, m encoding.Marshaler, opt ...http
return resp, err
}
if attempt < cli.redirect.MaxAttempts {
+ if debug {
log.Println("redirecting to " + redirectErr.newURL)
+ }
cli.With(httpcli.Endpoint(redirectErr.newURL))
select {
case <-getBackoff():
@@ -182,7 +184,9 @@ func (cli *client) redirectHandler() httpcli.Opt {
}
return nil, errNotHTTPCli
}
+ if debug {
log.Println("master changed?")
+ }
location, ok := buildNewEndpoint(res.Header.Get("Location"), cli.Endpoint())
if !ok {
return nil, errBadLocation
