diff --git a/fake-tcp/src/lib.rs b/fake-tcp/src/lib.rs index bf6647a..a431651 100644 --- a/fake-tcp/src/lib.rs +++ b/fake-tcp/src/lib.rs @@ -402,7 +402,7 @@ impl Stack { /// Connects to the remote end. `None` returned means /// the connection attempt failed. pub async fn connect(&mut self, addr: SocketAddr) -> Option { - let mut rng = SmallRng::from_entropy(); + let mut rng = SmallRng::from_os_rng(); for local_port in rng.gen_range(32768..=60999)..=60999 { let local_addr = SocketAddr::new( if addr.is_ipv4() {