mirror of
https://github.com/chatmail/core.git
synced 2026-04-23 00:16:34 +03:00
build: update rand to 0.9
We already have both rand 0.8 and rand 0.9 in our dependency tree. We still need rand 0.8 because public APIs of rPGP 0.17.0 and Iroh 0.35.0 use rand 0.8 types in public APIs, so it is imported as rand_old.
This commit is contained in:
@@ -7,7 +7,6 @@ use anyhow::{Context as _, Error, Result, bail};
|
||||
use async_channel::{self as channel, Receiver, Sender};
|
||||
use futures::future::try_join_all;
|
||||
use futures_lite::FutureExt;
|
||||
use rand::Rng;
|
||||
use tokio::sync::{RwLock, oneshot};
|
||||
use tokio::task;
|
||||
use tokio_util::sync::CancellationToken;
|
||||
@@ -831,7 +830,7 @@ async fn smtp_loop(
|
||||
let slept = time_elapsed(&now).as_secs();
|
||||
timeout = Some(cmp::max(
|
||||
t,
|
||||
slept.saturating_add(rand::thread_rng().gen_range((slept / 2)..=slept)),
|
||||
slept.saturating_add(rand::random_range((slept / 2)..=slept)),
|
||||
));
|
||||
} else {
|
||||
info!(ctx, "SMTP has no messages to retry, waiting for interrupt.");
|
||||
|
||||
Reference in New Issue
Block a user