Reproduce with a sleep

This commit is contained in:
Quentin 2022-06-03 14:23:34 +02:00
parent 5b3b2955fc
commit c6f0118ef8
Signed by: quentin
GPG key ID: E9602264D639FF68

View file

@ -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?;