From 6b0257515ddf83793b19e1b59102ef5c2c879886 Mon Sep 17 00:00:00 2001 From: heqingpan Date: Mon, 30 Dec 2024 23:22:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=8F=B0=E5=89=8D=E7=AB=AF=E7=89=88=E6=9C=AC=E5=8F=B7=E4=B8=BA?= =?UTF-8?q?v0.5.9=E4=BF=AE=E5=A4=8D=E6=8E=A7=E5=88=B6=E5=8F=B0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=AE=A1=E7=90=86=E5=88=97=E8=A1=A8=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E7=A9=BA=E9=97=B4=E7=99=BD=E5=90=8D=E5=8D=95=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E4=B8=8D=E6=AD=A3=E7=A1=AE=E9=97=AE=E9=A2=98?= =?UTF-8?q?;=20#190=20chore:=20=E6=9B=B4=E6=96=B0=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E5=90=8E=E6=94=AF=E6=8C=81=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E5=B7=B2=E7=99=BB=E9=99=86session=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.toml | 2 +- src/raft/cache/mod.rs | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 87401231..e33d3909 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,7 +71,7 @@ mime_guess = { version = "2" } rusqlite = { version = "0.25", features = ["bundled"] } rsql_builder = "0.1.5" inner-mem-cache = "0.1.7" -rnacos-web-dist-wrap = "=0.5.8" +rnacos-web-dist-wrap = "=0.5.9" nacos_rust_client = "0.3.2" zip = "0.6" tempfile = "3" diff --git a/src/raft/cache/mod.rs b/src/raft/cache/mod.rs index 60efef8a..810e6c09 100644 --- a/src/raft/cache/mod.rs +++ b/src/raft/cache/mod.rs @@ -110,11 +110,9 @@ impl CacheManager { fn user_privilege_has_changed(&self, v: &CacheValue) -> bool { if let CacheValue::UserSession(session) = &v { - if session.refresh_time > 0 { - if let Some(change_time) = self.user_privilege_change_time.get(&session.username) { - if *change_time > session.refresh_time { - return true; - } + if let Some(change_time) = self.user_privilege_change_time.get(&session.username) { + if *change_time > session.refresh_time { + return true; } } }