Set timeout on appservice client

This commit is contained in:
Neil Alexander 2021-03-04 14:40:20 +00:00
parent d327bacf28
commit 0d95e06045
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -295,6 +295,7 @@ func (b *BaseDendrite) CreateClient() *gomatrixserverlib.Client {
func (b *BaseDendrite) CreateAppserviceClient() *gomatrixserverlib.Client {
opts := []gomatrixserverlib.ClientOption{
gomatrixserverlib.WithSkipVerify(b.Cfg.AppServiceAPI.DisableTLSValidation),
gomatrixserverlib.WithTimeout(time.Second * 60),
}
if b.Cfg.Global.DNSCache.Enabled {
opts = append(opts, gomatrixserverlib.WithDNSCache(b.DNSCache))