Skip to content

Commit ce59aff

Browse files
Make test less flaky
1 parent 002f241 commit ce59aff

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

mtorrent-cli/tests/test_complete_torrent.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,17 @@ async fn listening_peer<P: Peer>(
446446
accept_and_run!(listener);
447447
}
448448
}
449-
Err(e) if e.kind() == io::ErrorKind::AddrInUse => {
449+
Err(e)
450+
if matches!(
451+
e.kind(),
452+
io::ErrorKind::AddrInUse
453+
| io::ErrorKind::PermissionDenied
454+
| io::ErrorKind::AddrNotAvailable
455+
) =>
456+
{
450457
eprintln!("Couldn't create listener on {listening_addr}")
451458
}
452-
Err(e) => panic!("{e}"),
459+
Err(e) => panic!("{e:?}"),
453460
}
454461
}
455462

0 commit comments

Comments
 (0)