aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-06-03 14:23:34 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-06-03 14:23:34 +0200
commitc6f0118ef8fea9185fbbe77bb449c38c9664d5ba (patch)
treed142805dfc4328425d88dd239fb5039ee343df2b
parent5b3b2955fc9925b535b2b9049027d947f6bcd47e (diff)
downloadaerogramme-c6f0118ef8fea9185fbbe77bb449c38c9664d5ba.tar.gz
aerogramme-c6f0118ef8fea9185fbbe77bb449c38c9664d5ba.zip
Reproduce with a sleep
-rw-r--r--src/server.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server.rs b/src/server.rs
index 6080fa2..fe4f2ec 100644
--- a/src/server.rs
+++ b/src/server.rs
@@ -44,6 +44,8 @@ impl Service<Request> for Connection {
let r = match req.body {
CommandBody::Capability => {
+ use tokio::time::{sleep, Duration};
+ sleep(Duration::from_millis(100)).await;
let capabilities = vec![Capability::Imap4Rev1, Capability::Idle];
let body = vec![Data::Capability(capabilities)];
Response::ok(
@@ -148,8 +150,8 @@ impl Server {
let creds = self.mailstore.login_provider.login("quentin", "poupou").await?;
- let mut mailbox = Mailbox::new(&creds, "TestMailbox".to_string()).await?;
- mailbox.test().await?;
+ //let mut mailbox = Mailbox::new(&creds, "TestMailbox".to_string()).await?;
+ //mailbox.test().await?;
let server = ImapServer::new(self.incoming).serve(Instance::new(self.mailstore.clone()));
let _ = server.await?;