From 553020bb28f530b1f9cf29f07fd5e03226bac67c Mon Sep 17 00:00:00 2001 From: Brad Murray Date: Sun, 9 Mar 2025 18:23:48 -0400 Subject: [PATCH] Extend HTTP timeouts for getting the full key backup --- client.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/client.go b/client.go index 7b5a7fe47..4c9e96ffa 100644 --- a/client.go +++ b/client.go @@ -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 }