Skip to content

Commit 4700623

Browse files
aledbfroboquat
authored andcommitted
[ws-manager] Configure http client timeouts
1 parent edfd76d commit 4700623

File tree

1 file changed

+12
-0
lines changed
  • components/ws-manager/pkg/manager

1 file changed

+12
-0
lines changed

Diff for: components/ws-manager/pkg/manager/probe.go

+12
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"context"
99
"crypto/tls"
1010
"io/ioutil"
11+
"net"
1112
"net/http"
1213
"net/url"
1314
"time"
@@ -72,6 +73,17 @@ func (p *WorkspaceReadyProbe) Run(ctx context.Context) WorkspaceProbeResult {
7273
Timeout: p.Timeout,
7374
Transport: &http.Transport{
7475
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
76+
DialContext: (&net.Dialer{
77+
Timeout: 30 * time.Second,
78+
KeepAlive: 30 * time.Second,
79+
DualStack: false,
80+
}).DialContext,
81+
MaxIdleConns: 0,
82+
MaxIdleConnsPerHost: 32,
83+
IdleConnTimeout: 30 * time.Second,
84+
TLSHandshakeTimeout: 10 * time.Second,
85+
ExpectContinueTimeout: 5 * time.Second,
86+
DisableKeepAlives: true,
7587
},
7688
CheckRedirect: func(req *http.Request, via []*http.Request) error {
7789
return http.ErrUseLastResponse

0 commit comments

Comments
 (0)