Skip to content

Commit

Permalink
refactor(apps): remove useless http client
Browse files Browse the repository at this point in the history
  • Loading branch information
EtienneM committed Mar 24, 2023
1 parent 6d3b8ac commit 89f33ae
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions apps/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,12 +347,6 @@ func (runCtx *runContext) connectToRunServer(ctx context.Context) (*http.Respons
if err != nil {
return nil, nil, errgo.Mask(err, errgo.Any)
}
httpClient := &http.Client{
Transport: &http.Transport{
Proxy: http.ProxyFromEnvironment,
TLSClientConfig: config.TLSConfig,
},
}

var conn *httputil.ClientConn
if url.Scheme == "https" {
Expand All @@ -367,7 +361,7 @@ func (runCtx *runContext) connectToRunServer(ctx context.Context) (*http.Respons
return nil, nil, errgo.Newf("Invalid scheme format %s", url.Scheme)
}

res, err := httpClient.Do(req)
res, err := conn.Do(req)
if err != nil {
if err, ok := err.(*net.OpError); ok {
if err.Err.Error() == "record overflow" {
Expand Down

0 comments on commit 89f33ae

Please sign in to comment.