mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 16:26:31 +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
|
// if we can't properly terminate the idle
|
||||||
// protocol let's break the connection.
|
// protocol let's break the connection.
|
||||||
let res = async_std::future::timeout(Duration::from_secs(15), async {
|
let res =
|
||||||
handle.done().await
|
async_std::future::timeout(Duration::from_secs(15), handle.done());
|
||||||
});
|
|
||||||
match res.await {
|
match res.await {
|
||||||
Ok(Ok(session)) => {
|
Ok(Ok(session)) => {
|
||||||
*self.session.lock().await = Some(Session::Secure(session));
|
*self.session.lock().await = Some(Session::Secure(session));
|
||||||
@@ -149,9 +148,8 @@ impl Imap {
|
|||||||
}
|
}
|
||||||
// if we can't properly terminate the idle
|
// if we can't properly terminate the idle
|
||||||
// protocol let's break the connection.
|
// protocol let's break the connection.
|
||||||
let res = async_std::future::timeout(Duration::from_secs(15), async {
|
let res =
|
||||||
handle.done().await
|
async_std::future::timeout(Duration::from_secs(15), handle.done());
|
||||||
});
|
|
||||||
match res.await {
|
match res.await {
|
||||||
Ok(Ok(session)) => {
|
Ok(Ok(session)) => {
|
||||||
*self.session.lock().await = Some(Session::Insecure(session));
|
*self.session.lock().await = Some(Session::Insecure(session));
|
||||||
|
|||||||
Reference in New Issue
Block a user