]> git.proxmox.com Git - proxmox-backup.git/commit
http_client: add timeouts for critical connects
authorStefan Reiter <s.reiter@proxmox.com>
Mon, 21 Dec 2020 13:56:11 +0000 (14:56 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 22 Dec 2020 12:31:10 +0000 (13:31 +0100)
commit4799280ccd87d04602e50768e50bce2f804c4cae
tree775d21a593716552ae4234b33244aa5dbbddbd4a
parentcb4865466e26a8407f7b3b25b8db6cfc70c79d66
http_client: add timeouts for critical connects

Use timeout futures for sections that might hang in certain error
conditions. This is mostly intended to be used as a safeguard, not a
first line of defense - i.e. best-effort avoidance of total hangs.

Not every future used for the HttpClient/H2Client is changed, only those
where a quick response is to be expected. For example, the response
reading futures are left alone, so data transfer is never capped with
timeout, only the initial server connect.

It is also used for upgrading to H2 connections, as that can take a long
time on overloaded servers.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
src/client/http_client.rs