mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
remove old client
This commit is contained in:
@@ -22,8 +22,12 @@ skynet.register_protocol {
|
||||
return jsonpack.unpack(skynet.tostring(msg,sz))
|
||||
end,
|
||||
dispatch = function (_, _, session, args)
|
||||
local result = skynet.call("SIMPLEDB", "lua", table.unpack(args))
|
||||
response_client(session, result)
|
||||
local ok, result = pcall(skynet.call,"SIMPLEDB", "lua", table.unpack(args))
|
||||
if ok then
|
||||
response_client(session, { true, result })
|
||||
else
|
||||
response_client(session, { false, "Invalid command" })
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user