forked from mirror/grapevine
log more detailed backoff state for remote device key requests
This commit is contained in:
parent
1551833501
commit
141c60e4a3
1 changed files with 4 additions and 2 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue