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(
340340
341341 let ( tx, mut rx) = tokio:: sync:: mpsc:: channel :: < SynapseUser > ( 10 * 1024 * 1024 ) ;
342342
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" ) ;
344346 let task = tokio:: spawn (
345347 async move {
346348 let mut user_buffer = MasWriteBuffer :: new ( & mas, MasWriter :: write_users) ;
@@ -645,6 +647,8 @@ async fn migrate_devices(
645647
646648 let ( tx, mut rx) = tokio:: sync:: mpsc:: channel ( 10 * 1024 * 1024 ) ;
647649
650+ // create a new RNG seeded from the passed RNG so that we can move it into the
651+ // spawned task
648652 let mut rng = rand_chacha:: ChaChaRng :: from_rng ( rng) . expect ( "failed to seed rng" ) ;
649653 let task = tokio:: spawn (
650654 async move {
@@ -784,6 +788,8 @@ async fn migrate_unrefreshable_access_tokens(
784788 let ( tx, mut rx) = tokio:: sync:: mpsc:: channel ( 10 * 1024 * 1024 ) ;
785789
786790 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
787793 let mut rng = rand_chacha:: ChaChaRng :: from_rng ( rng) . expect ( "failed to seed rng" ) ;
788794 let task = tokio:: spawn (
789795 async move {
You can’t perform that action at this time.
0 commit comments