Skip to content

Commit

Permalink
=rpc添加了一些日志
Browse files Browse the repository at this point in the history
  • Loading branch information
liangdas committed May 24, 2017
1 parent 01b2db1 commit f9ae932
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions rpc/base/rpc_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ func (s *RPCServer) on_callback_handle(callbacks <-chan mqrpc.CallInfo) {
if callInfo.RpcInfo.Reply {
//需要回复的才回复
callInfo.Agent.(mqrpc.MQServer).Callback(callInfo)
}else{
//对于不需要回复的消息,可以判断一下是否出现错误,打印一些警告
if callInfo.Result.Error!=""{
log.Warning("rpc callback erro :\n%s",callInfo.Result.Error)
}
}
}
}
Expand Down

0 comments on commit f9ae932

Please sign in to comment.