Skip to content

Commit 00a3bdb

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 f781cee commit 00a3bdb

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
@@ -204,7 +204,7 @@ pub(crate) fn random_storage_path() -> PathBuf {
204204

205205
pub(crate) fn random_port() -> u16 {
206206
let mut rng = thread_rng();
207-
rng.gen_range(5000..65535)
207+
rng.gen_range(5000..32768)
208208
}
209209

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

0 commit comments

Comments
 (0)