Skip to content

Commit 4c718c6

Browse files
committed
Do not use random ports from ephemeral range
To avoid conflicts ("port in use") with ports that were used for outgoing connections and are now in the TIME_WAIT state.
1 parent a0e1231 commit 4c718c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/common/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ pub(crate) fn random_storage_path() -> PathBuf {
195195

196196
pub(crate) fn random_port() -> u16 {
197197
let mut rng = thread_rng();
198-
rng.gen_range(5000..65535)
198+
rng.gen_range(5000..32768)
199199
}
200200

201201
pub(crate) fn random_listening_addresses() -> Vec<SocketAddress> {

0 commit comments

Comments
 (0)