Skip to content

Commit

Permalink
ThriftRemoveGetters_common
Browse files Browse the repository at this point in the history
Reviewed By: dtolnay

Differential Revision: D64388374

fbshipit-source-id: e00d3b02c158bf70251b23658232cbc503ad37fa
  • Loading branch information
generatedunixname89002005287564 authored and facebook-github-bot committed Oct 20, 2024
1 parent 852911f commit b8b5f90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp-channel/cpp/HsChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,14 @@ apache::thrift::RpcOptions getRpcOptions(
thrift::protocol::RpcOptions>(
folly::ByteRange(rpcOptionsPtr, rpcOptionsLen));
rpcOpts.setTimeout(std::chrono::milliseconds(*tRpcOpts.timeout()));
auto priority = tRpcOpts.get_priority() == nullptr
auto priority = apache::thrift::get_pointer(tRpcOpts.priority()) == nullptr
? apache::thrift::RpcOptions::PRIORITY::NORMAL
: static_cast<apache::thrift::RpcOptions::PRIORITY>(
tRpcOpts.priority().value_unchecked());
rpcOpts.setPriority(priority);
rpcOpts.setChunkTimeout(std::chrono::milliseconds(*tRpcOpts.chunkTimeout()));
rpcOpts.setQueueTimeout(std::chrono::milliseconds(*tRpcOpts.queueTimeout()));
if (tRpcOpts.get_headers() != nullptr) {
if (apache::thrift::get_pointer(tRpcOpts.headers()) != nullptr) {
for (auto const& header : tRpcOpts.headers().value_unchecked()) {
rpcOpts.setWriteHeader(header.first, header.second);
}
Expand Down

0 comments on commit b8b5f90

Please sign in to comment.