Set internal HTTP API timeout to 10 minutes

This commit is contained in:
Neil Alexander 2020-10-01 14:35:06 +01:00
parent cb4b93b16c
commit 200c88e621
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -119,7 +119,7 @@ func NewBaseDendrite(cfg *config.Dendrite, componentName string, useHTTPAPIs boo
logrus.WithError(err).Warnf("Failed to create cache")
}
apiClient := http.Client{}
apiClient := http.Client{Timeout: time.Minute * 10}
client := http.Client{Timeout: HTTPClientTimeout}
if cfg.FederationSender.Proxy.Enabled {
client.Transport = &http.Transport{Proxy: http.ProxyURL(&url.URL{