From c6f0118ef8fea9185fbbe77bb449c38c9664d5ba Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Fri, 3 Jun 2022 14:23:34 +0200 Subject: Reproduce with a sleep --- src/server.rs | 6 ++++-- 1 file 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 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?; -- cgit v1.2.3