From cedc90d1f0f4b578595d5559b2452ad9acaff8e7 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 18 Oct 2023 14:09:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=99=BB=E5=BD=95session=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib_features/account/account.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib_features/account/account.go b/src/lib_features/account/account.go index 7d4af0d..2bdfd8f 100644 --- a/src/lib_features/account/account.go +++ b/src/lib_features/account/account.go @@ -22,7 +22,7 @@ func SessionToken(username, sourceAddr string) bool { if err != nil { logger.Errorf("SessionToken XormInsertSession err %v", err) } - if affected == 1 { + if affected >= 1 { // 过期时间单位秒 配置1800是半小时 expireTime := time.Duration(int64(libConfig.GetExpiresFromConfig())) * time.Second redis.SetByExpire("", "session_token", token, expireTime)