|
|
@@ -170,7 +170,17 @@ function getMails(receiverUuid,mailType)
|
|
|
local mailCnt = 0
|
|
|
while true do
|
|
|
local mail = {}
|
|
|
- if not LuaMongo.next(mail) then
|
|
|
+ -- if not LuaMongo.next(mail) then
|
|
|
+ -- break
|
|
|
+ -- end
|
|
|
+
|
|
|
+ local res, err = pcall(LuaMongo.next, mail)
|
|
|
+ if not res then
|
|
|
+ Log.write(Log.LOGID_DEBUG, "MailManager.getMails err = ".. err)
|
|
|
+ break
|
|
|
+ end
|
|
|
+
|
|
|
+ if not err then
|
|
|
break
|
|
|
end
|
|
|
|