Skip to content

Commit

Permalink
update main.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
kfatyuip committed Jul 21, 2024
1 parent 04ffed3 commit 1c87a99
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,11 +223,10 @@ async fn main() -> Result<(), Box<dyn Error>> {
}

let arg = Args::parse();
*CONFIG_PATH.lock().unwrap() = arg.config;
*CONFIG_PATH.lock()? = arg.config;

let listener = TcpListener::bind(format!("{}:{}", CONFIG.bind.addr, CONFIG.bind.listen))
.await
.unwrap();
let listener =
TcpListener::bind(format!("{}:{}", CONFIG.bind.addr, CONFIG.bind.listen)).await?;

loop {
let (mut stream, addr) = listener.accept().await?;
Expand Down

0 comments on commit 1c87a99

Please sign in to comment.