Skip to content

Commit

Permalink
Prevent crash if HTTP client options are not set
Browse files Browse the repository at this point in the history
We should use Get*() here instead of accessing the struct field
directly, as the strict may be nil.
  • Loading branch information
EdSchouten committed Sep 2, 2023
1 parent f2e52ac commit 0a74138
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/http/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func NewRoundTripperFromConfiguration(configuration *pb.ClientConfiguration) (ht
Timeout: 30 * time.Second,
KeepAlive: 30 * time.Second,
}).DialContext,
ForceAttemptHTTP2: !configuration.DisableHttp2,
ForceAttemptHTTP2: !configuration.GetDisableHttp2(),
TLSClientConfig: tlsConfig,
}
if proxyURL := configuration.GetProxyUrl(); proxyURL != "" {
Expand Down

0 comments on commit 0a74138

Please sign in to comment.