mirror of
https://github.com/tulir/gomuks.git
synced 2025-04-20 10:33:41 -05:00
hicli: apply more default settings to http transport
This commit is contained in:
parent
d432bbc26e
commit
96019b6ef7
1 changed files with 7 additions and 2 deletions
|
@ -92,12 +92,17 @@ func New(rawDB, cryptoDB *dbutil.Database, log zerolog.Logger, pickleKey []byte,
|
|||
UserAgent: mautrix.DefaultUserAgent,
|
||||
Client: &http.Client{
|
||||
Transport: &http.Transport{
|
||||
DialContext: (&net.Dialer{Timeout: 10 * time.Second}).DialContext,
|
||||
TLSHandshakeTimeout: 10 * time.Second,
|
||||
DialContext: (&net.Dialer{Timeout: 10 * time.Second}).DialContext,
|
||||
// This needs to be relatively high to allow initial syncs,
|
||||
// it's lowered after the first sync in postProcessSyncResponse
|
||||
ResponseHeaderTimeout: 300 * time.Second,
|
||||
// Default settings from http.DefaultTransport
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
ForceAttemptHTTP2: true,
|
||||
MaxIdleConns: 100,
|
||||
IdleConnTimeout: 90 * time.Second,
|
||||
TLSHandshakeTimeout: 10 * time.Second,
|
||||
ExpectContinueTimeout: 1 * time.Second,
|
||||
},
|
||||
Timeout: 300 * time.Second,
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue