From 3730001ba509c10a2b7c3fe2fdf69b6ce808a31f Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 18 Oct 2023 14:02:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8F=92=E5=85=A5session=E6=98=AF?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E5=A4=A7=E4=BA=8E1=E7=9A=84?= 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 7d4af0d8..2bdfd8fc 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)