Skip to content

Commit 0f621ff

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 6f1edcd commit 0f621ff

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)