]> git.proxmox.com Git - proxmox-backup.git/commit - src/client/http_client.rs
fix #2870: renew tickets in HttpClient
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 15 Sep 2020 09:15:00 +0000 (11:15 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 17 Sep 2020 04:09:54 +0000 (06:09 +0200)
commitdd4b42bac1c0e330a984a7f0d672bea69f1c8ba3
tree38e1231f5acf8460b199fa24e8b6ace1f3a163b5
parent9626c286198aca2183a4793eb622d30f1065ab1e
fix #2870: renew tickets in HttpClient

by packing the auth into a RwLock and starting a background
future that renews the ticket every 15 minutes

we still use the BroadcastFuture for the first ticket and only
if that is finished we start the scheduled future

we have to store an abort handle for the renewal future and abort it when
the http client is dropped, so we do not request new tickets forever

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/client/http_client.rs