Skip to content
Snippets Groups Projects
Commit e9945761 authored by Kamil Trzcinski's avatar Kamil Trzcinski
Browse files

Fix network timeouts

Response Header Timeout cannot be too low, as we long-poll on connection, so we delay pushing headers to client
parent 6a81cebe
No related branches found
No related tags found
No related merge requests found
......@@ -158,11 +158,13 @@ func (n *client) createTransport() {
return dialer.Dial(network, addr)
},
TLSClientConfig: &tlsConfig,
MaxIdleConns: 100,
IdleConnTimeout: 90 * time.Second,
TLSHandshakeTimeout: 10 * time.Second,
ExpectContinueTimeout: 1 * time.Second,
IdleConnTimeout: 30 * time.Second,
ResponseHeaderTimeout: 10 * time.Second,
ResponseHeaderTimeout: 10 * time.Minute,
}
n.Timeout = common.DefaultNetworkClientTimeout
}
func (n *client) getCAChain(tls *tls.ConnectionState) string {
......@@ -366,7 +368,6 @@ func newClient(requestCredentials requestCredentials) (c *client, err error) {
compatibleWithGitLab: true,
requestBackOffs: make(map[string]*backoff.Backoff),
}
c.Timeout = common.DefaultNetworkClientTimeout
host := strings.Split(url.Host, ":")[0]
if CertificateDirectory != "" {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment