Last active
August 22, 2019 22:23
-
-
Save eknowlton/7e61269d21329f824781d4e036892918 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get `IDLE` handle | |
match session.idle() { | |
Err(error) => { | |
println!("Failed to send command: IDLE"); | |
println!("IMAP server may not support IDLE command."); | |
println!("Error: {}", error); | |
std::process::exit(126); | |
} | |
Ok(idle) => { | |
println!("Waiting for Ctrl-C..."); | |
while running.load(Ordering::SeqCst) { | |
idle.wait_keepalive(); | |
// ^ -- Moved value being used here | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment