mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 13:17:55 +08:00
prevent simultaneous imap conn
This commit is contained in:
+1
-1
@@ -37,9 +37,9 @@ pub fn mbox_matches(matches: &ArgMatches) -> Result<bool> {
|
||||
let config = Config::new_from_file()?;
|
||||
let account = config.find_account_by_name(matches.value_of("account"))?;
|
||||
let output_fmt = matches.value_of("output").unwrap();
|
||||
let mut imap_conn = ImapConnector::new(&account)?;
|
||||
|
||||
if let Some(_) = matches.subcommand_matches("mailboxes") {
|
||||
let mut imap_conn = ImapConnector::new(&account)?;
|
||||
let mboxes = imap_conn.list_mboxes()?;
|
||||
print(&output_fmt, mboxes)?;
|
||||
imap_conn.logout();
|
||||
|
||||
Reference in New Issue
Block a user