diff --git a/script/network/net_client.lua b/script/network/net_client.lua index fa83b310..ed61e32d 100644 --- a/script/network/net_client.lua +++ b/script/network/net_client.lua @@ -1,7 +1,6 @@ --net_client.lua local log_err = logger.err -local log_fatal = logger.fatal local qeval = quanta.eval local qxpcall = quanta.xpcall @@ -112,17 +111,12 @@ function NetClient:close() end end -function NetClient:write(cmd, data, type, session_id, flag) +function NetClient:write(cmd_id, data, type, session_id, flag) if not self.alive then return false end - local body, cmd_id, pflag = self:encode(cmd, data, flag) - if not body then - log_fatal("[NetClient][write] encode failed! data (%s-%s)", cmd_id, body) - return false - end -- call lbus - local send_len = self.socket.call_pb(cmd_id, pflag, type, session_id, data) + local send_len = self.socket.call_pb(cmd_id, flag, type, session_id, data) if send_len < 0 then log_err("[NetClient][write] call_pb failed! code:%s", send_len) return false