ehds commented on code in PR #1938:
URL: https://github.com/apache/incubator-brpc/pull/1938#discussion_r985032961
##########
tools/rpc_replay/rpc_replay.cpp:
##########
@@ -83,7 +83,9 @@ int ChannelGroup::Init() {
_chans.resize(max_protocol_size + 1);
for (size_t i = 0; i < protocols.size(); ++i) {
if (protocols[i].second.support_client() &&
- protocols[i].second.support_server()) {
+ protocols[i].second.support_server() &&
+ (brpc::StringToConnectionType(FLAGS_connection_type) &
Review Comment:
目前是把 `ChannelOptions` 的初始化放到判断之前,方便用于判断 `connection_type` 和 `protocol`
的支持关系。如果`connection_type` 为 `CONNECTION_TYPE_UNKNOWN` 或者 `protocol` 支持用户指定的
`connection_type` 才继续往下。这里没有判断 `connection_type `是否` has_error`(用户输入非法的
`connection_type`),因为 InitChannelOptions 中会根据协议支持的 protoctol connection_type
进行选择。
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]