Skip to content

Commit

Permalink
Disable HTTP/2
Browse files Browse the repository at this point in the history
HTTP/2 support is golang has many problematic cornercases where dead
connections would be kept.

golang/go#32388
golang/go#39337
golang/go#39750

I suggest we disable HTTP/2 for now and enable it manually on the
blackbox exporter.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
  • Loading branch information
roidelapluie committed Aug 3, 2020
1 parent 217fd62 commit 3fcbde5
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions config/http_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import (
"time"

"github.com/mwitkow/go-conntrack"
"golang.org/x/net/http2"
"gopkg.in/yaml.v2"
)

Expand Down Expand Up @@ -154,11 +153,6 @@ func NewRoundTripperFromConfig(cfg HTTPClientConfig, name string, disableKeepAli
conntrack.DialWithName(name),
),
}
// TODO: use ForceAttemptHTTP2 when we move to Go 1.13+.
err := http2.ConfigureTransport(rt.(*http.Transport))
if err != nil {
return nil, err
}

// If a bearer token is provided, create a round tripper that will set the
// Authorization header correctly on each request.
Expand Down

0 comments on commit 3fcbde5

Please sign in to comment.