mirror of
https://github.com/rustdesk/rustdesk-server.git
synced 2026-11-27 16:24:03 +00:00
refactor: replace static with const for global constants (#494)
This commit is contained in:
1 parent
2f246537df
commit
772db7422f
3 files changed
+6
-6
No files matched your search
+4
-4
@@ -18,10 +18,10 @@ lazy_static::lazy_static! {
|
||||
pub(crate) static ref USER_STATUS: RwLock<UserStatusMap> = Default::default();
|
||||
pub(crate) static ref IP_CHANGES: Mutex<IpChangesMap> = Default::default();
|
||||
}
|
||||
pub static IP_CHANGE_DUR: u64 = 180;
|
||||
pub static IP_CHANGE_DUR_X2: u64 = IP_CHANGE_DUR * 2;
|
||||
pub static DAY_SECONDS: u64 = 3600 * 24;
|
||||
pub static IP_BLOCK_DUR: u64 = 60;
|
||||
pub const IP_CHANGE_DUR: u64 = 180;
|
||||
pub const IP_CHANGE_DUR_X2: u64 = IP_CHANGE_DUR * 2;
|
||||
pub const DAY_SECONDS: u64 = 3600 * 24;
|
||||
pub const IP_BLOCK_DUR: u64 = 60;
|
||||
|
||||
#[derive(Debug, Default, Serialize, Deserialize, Clone)]
|
||||
pub(crate) struct PeerInfo {
|
||||
|
||||
Reference in new issue
Block a user