From 5f7069203f385fad3c7fdbc070e130d60e20f437 Mon Sep 17 00:00:00 2001 From: Schlefix Date: Fri, 15 Dec 2023 13:56:10 +0100 Subject: [PATCH] changing random id generation from 0-2^56-1 to 1-2^53 (following WAMP protocoll definition) --- src/router/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/router/mod.rs b/src/router/mod.rs index 8a095fe..7073100 100644 --- a/src/router/mod.rs +++ b/src/router/mod.rs @@ -250,7 +250,7 @@ static WAMP_MSGPACK: &str = "wamp.2.msgpack"; fn random_id() -> u64 { let mut rng = thread_rng(); // TODO make this a constant - rng.gen_range(0..1u64.rotate_left(56) - 1) + rng.gen_range(1..1u64.rotate_left(53)) } unsafe impl Sync for Router {}