tools/imapshell: actually send LOGOUT instead of just closing socket

pull/234/head
Manos Pitsidianakis 4 years ago
parent 8f46c4ebe7
commit e878c50af5
No known key found for this signature in database
GPG Key ID: 73627C2F690DF710

@ -1216,9 +1216,6 @@ impl ImapType {
match io::stdin().read_line(&mut input) {
Ok(_) => {
if input.trim().eq_ignore_ascii_case("logout") {
break;
}
futures::executor::block_on(timeout(
Duration::from_secs(3),
conn.send_command(input.as_bytes()),
@ -1229,6 +1226,9 @@ impl ImapType {
conn.read_lines(&mut res, String::new()),
))
.unwrap();
if input.trim().eq_ignore_ascii_case("logout") {
break;
}
/*
if input.trim() == "IDLE" {
let mut iter = ImapBlockingConnection::from(conn);
@ -1238,9 +1238,9 @@ impl ImapType {
conn = iter.into_conn();
}
*/
debug!("out: {}", &res);
println!("S: {}", &res);
}
Err(error) => debug!("error: {}", error),
Err(error) => println!("error: {}", error),
}
}
}

Loading…
Cancel
Save