Skip to content

Commit 063b439

Browse files
Apply suggestions from code review
Co-authored-by: Mauro Ezequiel Moltrasio <moltrasiom@hotmail.com>
1 parent 85b95e8 commit 063b439

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/worker/network.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ impl NetworkWorker {
5252
let listener = loop {
5353
match TcpListener::bind((addr.to_string(), target_port)) {
5454
Ok(l) => break l,
55-
Err(e) if e.kind() == std::io::ErrorKind::AddrInUse => {
55+
Err(e) if e.kind() == io::ErrorKind::AddrInUse => {
5656
retries += 1;
5757
if retries > MAX_BIND_RETRIES {
5858
return Err(WorkerError::InternalWithMessage(format!(
5959
"Failed to bind {}:{} after {} retries: {}",
6060
addr, target_port, MAX_BIND_RETRIES, e
6161
)));
6262
}
63-
thread::sleep(std::time::Duration::from_secs(1));
63+
thread::sleep(Duration::from_secs(1));
6464
}
6565
Err(e) => panic!("Failed to bind: {}", e),
6666
}

0 commit comments

Comments
 (0)