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

memfd
Manos Pitsidianakis 2020-08-28 00:16:37 +03:00
parent 8f46c4ebe7
commit e878c50af5
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 5 additions and 5 deletions

View File

@ -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),
}
}
}