Commit 4f92e064 authored by heyuyi0906's avatar heyuyi0906

refine code

parent 935a12ae
......@@ -468,6 +468,11 @@ void Channel::CallMethod(const google::protobuf::MethodDescriptor* method,
// possible executions, including:
// HandleSendFailed => OnVersionedRPCReturned => IssueRPC(pack_request)
_serialize_request(&cntl->_request_buf, cntl, request);
if (cntl->FailedInline()) {
// Handle failures caused by serialize_request, and these error_codes
// should be excluded from the retry_policy.
return cntl->HandleSendFailed();
}
if (FLAGS_usercode_in_pthread &&
done != NULL &&
TooManyUserCode()) {
......@@ -475,14 +480,6 @@ void Channel::CallMethod(const google::protobuf::MethodDescriptor* method,
"-usercode_in_pthread is on");
return cntl->HandleSendFailed();
}
if (cntl->FailedInline()) {
// probably failed before RPC, not called until all necessary
// parameters in `cntl' are set.
return cntl->HandleSendFailed();
}
if (cntl->FailedInline()) {
return cntl->HandleSendFailed();
}
if (cntl->_request_stream != INVALID_STREAM_ID) {
// Currently we cannot handle retry and backup request correctly
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment