fix: avoid lock for probe_network, avoiding deadlock on startup

Closes #1532
This commit is contained in:
dignifiedquire
2020-05-27 15:13:29 +02:00
parent 9f7f387540
commit 6100a23e80
6 changed files with 205 additions and 166 deletions

View File

@@ -109,7 +109,7 @@ const SELECT_ALL: &str = "1:*";
#[derive(Debug)]
pub struct Imap {
idle_interrupt: Receiver<()>,
idle_interrupt: Receiver<bool>,
config: ImapConfig,
session: Option<Session>,
connected: bool,
@@ -181,7 +181,7 @@ impl Default for ImapConfig {
}
impl Imap {
pub fn new(idle_interrupt: Receiver<()>) -> Self {
pub fn new(idle_interrupt: Receiver<bool>) -> Self {
Imap {
idle_interrupt,
config: Default::default(),