Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion crates/syn2mas/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@ async fn migrate_users(

let (tx, mut rx) = tokio::sync::mpsc::channel::<SynapseUser>(10 * 1024 * 1024);

let mut rng = rand_chacha::ChaCha8Rng::from_rng(rng).expect("failed to seed rng");
// create a new RNG seeded from the passed RNG so that we can move it into the
// spawned task
let mut rng = rand_chacha::ChaChaRng::from_rng(rng).expect("failed to seed rng");
let task = tokio::spawn(
async move {
let mut user_buffer = MasWriteBuffer::new(&mas, MasWriter::write_users);
Expand Down Expand Up @@ -645,6 +647,8 @@ async fn migrate_devices(

let (tx, mut rx) = tokio::sync::mpsc::channel(10 * 1024 * 1024);

// create a new RNG seeded from the passed RNG so that we can move it into the
// spawned task
let mut rng = rand_chacha::ChaChaRng::from_rng(rng).expect("failed to seed rng");
let task = tokio::spawn(
async move {
Expand Down Expand Up @@ -784,6 +788,8 @@ async fn migrate_unrefreshable_access_tokens(
let (tx, mut rx) = tokio::sync::mpsc::channel(10 * 1024 * 1024);

let now = clock.now();
// create a new RNG seeded from the passed RNG so that we can move it into the
// spawned task
let mut rng = rand_chacha::ChaChaRng::from_rng(rng).expect("failed to seed rng");
let task = tokio::spawn(
async move {
Expand Down
Loading