Skip to content

Commit 5d412c3

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 54bed69 commit 5d412c3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/common/mod.rs

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

203203
pub(crate) fn random_port() -> u16 {
204204
let mut rng = thread_rng();
205-
rng.gen_range(5000..65535)
205+
rng.gen_range(5000..32768)
206206
}
207207

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

0 commit comments

Comments
 (0)