Skip to content

Commit

Permalink
feat: flush terminal before exit
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Münte committed Oct 15, 2021
1 parent ad08838 commit b482a88
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.rs
Expand Up @@ -5,7 +5,8 @@ use std::net::TcpStream;
use std::sync::mpsc;
use std::sync::Arc;
use std::sync::Mutex;
use std::{thread, time};
use std::{thread};
use std::io::{self, Write};

#[derive(Clap)]
#[clap(version = crate_version!(), author = "Josh M. <https://github.com/joshmuente>")]
Expand Down Expand Up @@ -122,7 +123,7 @@ fn main() {
opts.to_port - opts.from_port + 1
}));
loader.end();
thread::sleep(time::Duration::from_millis(200));
io::stdout().flush().unwrap();
std::process::exit(exitcode::OK);
}

Expand Down

0 comments on commit b482a88

Please sign in to comment.