You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2020/07/14 09:04:39 UTC

[GitHub] [incubator-brpc] zyearn commented on a change in pull request #1161: fix h2_req check failed when retry after ELIMIT error

zyearn commented on a change in pull request #1161:
URL: https://github.com/apache/incubator-brpc/pull/1161#discussion_r454211947



##########
File path: src/brpc/channel.cpp
##########
@@ -464,6 +464,8 @@ void Channel::CallMethod(const google::protobuf::MethodDescriptor* method,
     // Share the lb with controller.
     cntl->_lb = _lb;
 
+    // serialize_request must be done before pack_request
+    _serialize_request(&cntl->_request_buf, cntl, request);

Review comment:
       我觉得这个注释可以优化一下,“serialize_request must be done before pack_request”是对代码本身的复述,而这里最好写明意图,即为什么要把这行放这里,为什么必须要在HandleSendFailed之前,否则过段时间,维护者还是有可能在这之前调用HandleSendFailed




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org