proxmox/proxmox-notify
Lukas Wagner dfe81b5db8 notify: webhook, gotify: set HTTP request timeout of 10s
By default, the sync client from proxmox-http (powered by ureq) does not
have any request timeout. To avoid blocking the current thread for a
prolonged period of time, we now make use of the previously added
`Client::new_with_timeout` function to create a new HTTP client with a
default timeout of 10 seconds.

In the long run it would be nicer to have a higher timeout here, say
60s, to cope with flaky and high-latency networks and potentially
overloaded targets. But for that we need to change the architecture of
how notifications are send out to ensure that now thread accepting
connections can be blocked.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
 [ TL: Change timeout from 5s to 10s as trade-off and expand commit
   message slightly with some reasoning for that still relatively
   short time value ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2024-11-26 14:12:57 +01:00
..
debian notify: bump version to 0.5.0-1 2024-11-10 18:58:59 +01:00
src notify: webhook, gotify: set HTTP request timeout of 10s 2024-11-26 14:12:57 +01:00
Cargo.toml notify: bump version to 0.5.0-1 2024-11-10 18:58:59 +01:00