Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ categories = [ "network-programming", "asynchronous" ]
[dependencies]
bytes = "1.5.0"
fxhash = "0.2.1"
rand = "0.8.5"
rand = "0.9.1"
slab = "0.4.9"
thiserror = "1.0.58"
log = "0.4.21"
Expand Down
6 changes: 5 additions & 1 deletion src/endpoint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,12 @@ impl Endpoint {
///
/// Returns `Err` if the configuration is invalid.
pub fn new(config: Arc<EndpointConfig>, server_config: Option<Arc<ServerConfig>>) -> Self {
let rng = {
let mut base = rand::rng();
StdRng::from_rng(&mut base)
};
Self {
rng: StdRng::from_entropy(),
rng,
transmits: VecDeque::new(),
association_ids_init: HashMap::default(),
association_ids: FxHashMap::default(),
Expand Down
2 changes: 1 addition & 1 deletion src/param/param_state_cookie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl ParamStateCookie {
pub(crate) fn new() -> Self {
let mut cookie = BytesMut::new();
cookie.resize(32, 0);
rand::thread_rng().fill(cookie.as_mut());
rand::rng().fill(cookie.as_mut());

ParamStateCookie {
cookie: cookie.freeze(),
Expand Down
Loading