Browse Source

修改启动报错,以后需要处理邮件问题

mafei 1 year ago
parent
commit
fc42eac97a
1 changed files with 10 additions and 1 deletions
  1. 10 1
      script/core/RoleDel.lua

+ 10 - 1
script/core/RoleDel.lua

@@ -98,9 +98,18 @@ function handleMail()
 	LuaMongo.find(DB.db_mail)
 	local compareTime = os.time() - 7 * 24 * 3600 --删除7天以上的邮件
 	while true do
-		local mail = {}
+		--[[local mail = {}
 		if not LuaMongo.next(mail) then
 			break
+		end]]
+		local mail = {}
+		local pret,perr = pcall(LuaMongo.next,mail)
+		if not pret then
+		    print(perr)
+			break
+		end
+		if not next(mail) then 
+			break
 		end
 
         if mail.expireTime then  -- 有指定过期时间