File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -340,7 +340,9 @@ async fn migrate_users(
340
340
341
341
let ( tx, mut rx) = tokio:: sync:: mpsc:: channel :: < SynapseUser > ( 10 * 1024 * 1024 ) ;
342
342
343
- let mut rng = rand_chacha:: ChaCha8Rng :: from_rng ( rng) . expect ( "failed to seed rng" ) ;
343
+ // create a new RNG seeded from the passed RNG so that we can move it into the
344
+ // spawned task
345
+ let mut rng = rand_chacha:: ChaChaRng :: from_rng ( rng) . expect ( "failed to seed rng" ) ;
344
346
let task = tokio:: spawn (
345
347
async move {
346
348
let mut user_buffer = MasWriteBuffer :: new ( & mas, MasWriter :: write_users) ;
@@ -645,6 +647,8 @@ async fn migrate_devices(
645
647
646
648
let ( tx, mut rx) = tokio:: sync:: mpsc:: channel ( 10 * 1024 * 1024 ) ;
647
649
650
+ // create a new RNG seeded from the passed RNG so that we can move it into the
651
+ // spawned task
648
652
let mut rng = rand_chacha:: ChaChaRng :: from_rng ( rng) . expect ( "failed to seed rng" ) ;
649
653
let task = tokio:: spawn (
650
654
async move {
@@ -784,6 +788,8 @@ async fn migrate_unrefreshable_access_tokens(
784
788
let ( tx, mut rx) = tokio:: sync:: mpsc:: channel ( 10 * 1024 * 1024 ) ;
785
789
786
790
let now = clock. now ( ) ;
791
+ // create a new RNG seeded from the passed RNG so that we can move it into the
792
+ // spawned task
787
793
let mut rng = rand_chacha:: ChaChaRng :: from_rng ( rng) . expect ( "failed to seed rng" ) ;
788
794
let task = tokio:: spawn (
789
795
async move {
You can’t perform that action at this time.
0 commit comments