remove old client

This commit is contained in:
Cloud Wu
2014-04-14 22:31:23 +08:00
parent 98c9059a60
commit 47167ea2e8
4 changed files with 8 additions and 66 deletions

View File

@@ -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
}