mirror of
https://github.com/chatmail/core.git
synced 2026-04-02 05:22:14 +03:00
address @link2xt comment on done/async
This commit is contained in:
@@ -96,9 +96,8 @@ impl Imap {
|
||||
}
|
||||
// if we can't properly terminate the idle
|
||||
// protocol let's break the connection.
|
||||
let res = async_std::future::timeout(Duration::from_secs(15), async {
|
||||
handle.done().await
|
||||
});
|
||||
let res =
|
||||
async_std::future::timeout(Duration::from_secs(15), handle.done());
|
||||
match res.await {
|
||||
Ok(Ok(session)) => {
|
||||
*self.session.lock().await = Some(Session::Secure(session));
|
||||
@@ -149,9 +148,8 @@ impl Imap {
|
||||
}
|
||||
// if we can't properly terminate the idle
|
||||
// protocol let's break the connection.
|
||||
let res = async_std::future::timeout(Duration::from_secs(15), async {
|
||||
handle.done().await
|
||||
});
|
||||
let res =
|
||||
async_std::future::timeout(Duration::from_secs(15), handle.done());
|
||||
match res.await {
|
||||
Ok(Ok(session)) => {
|
||||
*self.session.lock().await = Some(Session::Insecure(session));
|
||||
|
||||
Reference in New Issue
Block a user