1
0
Fork 0
forked from mirror/grapevine

log more detailed backoff state for remote device key requests

This commit is contained in:
Benjamin Lee 2024-08-10 12:49:46 -07:00
parent 1551833501
commit 141c60e4a3
No known key found for this signature in database
GPG key ID: FB9624E2885D55A4

View file

@ -413,8 +413,10 @@ pub(crate) async fn get_keys_helper<F: Fn(&UserId) -> bool>(
min_elapsed_duration = Duration::from_secs(60 * 60 * 24);
}
if time.elapsed() < min_elapsed_duration {
debug!(%server, "Backing off from server");
if let Some(remaining) =
min_elapsed_duration.checked_sub(time.elapsed())
{
debug!(%server, %tries, ?remaining, "Backing off from server");
return (
server,
Err(Error::BadServerResponse(