Groups
Sign in
Groups
openresty
Conversations
Labels
About
Send feedback
Help
pcall里调用protobuf的encode,格式不正确,解析出错时时会有内存泄漏
26 views
Skip to first unread message
xianming wan
unread,
Nov 23, 2021, 1:59:17 AM
11/23/21
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to open...@googlegroups.com
--pcall里调用protobuf的encode,格式不正确,解析出错时时会有内存泄漏
local
pack =
""
local
ok, err = _global.
xpcall
(
function
()
pack = _global.
pb
.
encode
(
"com.request"
, request)
--这里
end
, debug.
traceback
)
if
not ok
then
pack =
nil
end
想确认下有没有比较安全且通用的处理方式,pb和xpcall都封装了下,但直接用xpcall或者pcall,结果也是一样。
Reply all
Reply to author
Forward
0 new messages