Extend HTTP timeouts for getting the full key backup

This commit is contained in:
Brad Murray 2025-03-09 18:23:48 -04:00
commit 553020bb28
No known key found for this signature in database
GPG key ID: A49463C6B5B28DCF

View file

@ -2181,7 +2181,17 @@ func (cli *Client) GetKeyBackup(ctx context.Context, version id.KeyBackupVersion
urlPath := cli.BuildURLWithQuery(ClientURLPath{"v3", "room_keys", "keys"}, map[string]string{
"version": string(version),
})
_, err = cli.MakeRequest(ctx, http.MethodGet, urlPath, nil, &resp)
_, err = cli.MakeFullRequest(ctx, FullRequest{
Method: http.MethodGet,
URL: urlPath,
ResponseJSON: &resp,
Client: &http.Client{
Timeout: 180 * time.Second,
Transport: &http.Transport{
ResponseHeaderTimeout: 180 * time.Second,
},
},
})
return
}