From 67b1bdd9e26b748897f8ba1b4a4abe84a28476ea Mon Sep 17 00:00:00 2001 From: Luca8991 Date: Fri, 15 Dec 2023 09:45:50 +0100 Subject: [PATCH] perf: rename const --- src/ic-websocket-cdk/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ic-websocket-cdk/src/lib.rs b/src/ic-websocket-cdk/src/lib.rs index dacada1..2857c09 100644 --- a/src/ic-websocket-cdk/src/lib.rs +++ b/src/ic-websocket-cdk/src/lib.rs @@ -30,10 +30,10 @@ const LABEL_WEBSOCKET: &[u8] = b"websocket"; const DEFAULT_MAX_NUMBER_OF_RETURNED_MESSAGES: usize = 50; /// The default interval at which to send acknowledgements to the client. const DEFAULT_SEND_ACK_INTERVAL_MS: u64 = 300_000; // 5 minutes -/// The maximum network latency allowed between the client and the canister. -const MAX_ALLOWED_NETWORK_LATENCY_MS: u64 = 30_000; // 30 seconds +/// The maximum communication latency allowed between the client and the canister. +const COMMUNICATION_LATENCY_BOUND_MS: u64 = 30_000; // 30 seconds /// The default timeout to wait for the client to send a keep alive after receiving an acknowledgement. -const CLIENT_KEEP_ALIVE_TIMEOUT_MS: u64 = 2 * MAX_ALLOWED_NETWORK_LATENCY_MS; +const CLIENT_KEEP_ALIVE_TIMEOUT_MS: u64 = 2 * COMMUNICATION_LATENCY_BOUND_MS; /// Same as [CLIENT_KEEP_ALIVE_TIMEOUT_MS], but in nanoseconds. const CLIENT_KEEP_ALIVE_TIMEOUT_NS: u64 = CLIENT_KEEP_ALIVE_TIMEOUT_MS * 1_000_000;