2 Commits 4f993b3613 ... f5eac5a976

Author SHA1 Message Date
  Justin Tracey f5eac5a976 README: add a note about repo status 2 months ago
  Justin Tracey 020aeedb68 client: nit: no need to specify tokio sleep 2 months ago
2 changed files with 8 additions and 5 deletions
  1. 3 0
      README.md
  2. 5 5
      src/bin/mgen-client.rs

+ 3 - 0
README.md

@@ -1,5 +1,8 @@
 ## MGen
 
+### N.B.: This work will soon be under submission.
+Please do not share this repo too widely yet to help maintain double-blind reviewing.
+
 MGen is a set of tools for generating simulated messenger traffic.
 It is designed for use analogous to (and likely in conjunction with) [TGen](https://github.com/shadow/tgen), but for simulating traffic generated from communications in messenger apps, such as Signal or WhatsApp, rather than web traffic or file downloads.
 Notably, this allows for studying network traffic properties of messenger apps in [Shadow](https://github.com/shadow/shadow).

+ 5 - 5
src/bin/mgen-client.rs

@@ -191,7 +191,7 @@ async fn reader(
                         let mut res = client.get(url.clone()).await;
                         while res.is_err() {
                             log!("Error fetching: {}", res.unwrap_err());
-                            tokio::time::sleep(retry).await;
+                            sleep(retry).await;
                             res = client.get(url.clone()).await;
                         }
                     });
@@ -260,7 +260,7 @@ async fn uploader(
             let mut res = client.request(request).await;
             while res.is_err() {
                 log!("{},{},Error uploading: {}", user, url, res.unwrap_err());
-                tokio::time::sleep(retry).await;
+                sleep(retry).await;
                 res = client.get(url.clone()).await;
             }
         }
@@ -324,7 +324,7 @@ async fn socket_updater(
                     str_params.recipient,
                     e
                 );
-                tokio::time::sleep(retry).await;
+                sleep(retry).await;
                 continue;
             }
             Err(MessengerError::Fatal(e)) => return e,
@@ -339,7 +339,7 @@ async fn socket_updater(
                     str_params.recipient,
                     e
                 );
-                tokio::time::sleep(retry).await;
+                sleep(retry).await;
                 continue;
             }
         };
@@ -379,7 +379,7 @@ async fn manage_conversation(
     mut state_from_reader: StateFromReader,
     mut state_to_writer: StateToWriter<MessageHolder>,
 ) {
-    tokio::time::sleep(Duration::from_secs_f64(config.bootstrap)).await;
+    sleep(Duration::from_secs_f64(config.bootstrap)).await;
     log!("{},{},awake", &config.user, &config.group);
 
     let mut rng = Xoshiro256PlusPlus::from_entropy();