Fix tokio panic

This might not be needed after all because of
https://github.com/tokio-rs/tokio/pull/5710, but since I already wrote
the code, I created a PR anyway.
This commit is contained in:
Hocuri
2023-05-23 10:38:19 +02:00
parent 5b435d11c7
commit ebfe917ed2
16 changed files with 65 additions and 29 deletions

View File

@@ -1,10 +1,10 @@
use deltachat::chat::{self, ChatId};
use deltachat::chatlist::*;
use deltachat::config;
use deltachat::contact::*;
use deltachat::context::*;
use deltachat::message::Message;
use deltachat::stock_str::StockStrings;
use deltachat::{chatlist::*, tools};
use deltachat::{EventType, Events};
use tempfile::tempdir;
@@ -80,7 +80,7 @@ async fn main() {
}
// wait for the message to be sent out
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
tools::sleep(std::time::Duration::from_secs(1)).await;
log::info!("fetching chats..");
let chats = Chatlist::try_load(&ctx, 0, None, None).await.unwrap();