From 4bc256aba4b2b4b0df209ee01982fdde8a19d506 Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Fri, 3 Oct 2025 21:13:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=95=B0=E6=8D=AE=E5=BA=93?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E6=8C=87=E9=92=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/dbmService.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/dbmService.go b/service/dbmService.go index 6610a54..3eb7f79 100644 --- a/service/dbmService.go +++ b/service/dbmService.go @@ -240,11 +240,11 @@ func GetDBTableDesc(req *proto.GetDBTableDescReq, userId int) (*proto.SQLResult, func DelDBMMap() { dao.DBMMapRWMutex.Lock() - defer dao.DBMMapRWMutex.Unlock() cur := worker.GetCurrentTimestamp() for k, v := range dao.DBMMap { - if cur-v.LastUserTime < proto.DBMMap_Max_Keep_Time { + if (cur - v.LastUserTime) > proto.DBMMap_Max_Keep_Time { delete(dao.DBMMap, k) //删除 } } + dao.DBMMapRWMutex.Unlock() }