Skip to content

Commit

Permalink
Fix recv_wrapped_XYZ rendering for streams
Browse files Browse the repository at this point in the history
Summary:
Type-filter issue with `stream_t` now resolving to `void_t`

#buildall

Reviewed By: iahs, thedavekwon

Differential Revision: D66459169

fbshipit-source-id: 893fc598484b7ef3ece688c862c62e5f0c750244
  • Loading branch information
Sam De Roeck authored and facebook-github-bot committed Nov 26, 2024
1 parent b7f0621 commit a4e27f9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,14 @@ folly::Try<apache::thrift::RpcResponseComplete<{{ > types/return_type_client}}>>
}
tryResponse->response.emplace();
auto ew = folly::fibers::runInMainContext([&] {
{{#if type:void?}}
return recv_wrapped_{{function:cpp_name}}(returnState);
{{#if function:stream?}}
return recv_wrapped_{{function:cpp_name}}(tryResponse->response.value(), returnState);
{{else}}
{{#if type:void?}}
return recv_wrapped_{{function:cpp_name}}(returnState);
{{else}}
return recv_wrapped_{{function:cpp_name}}(tryResponse->response.value(), returnState);
{{/if}}
{{/if}}
});
if (ew) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ apache::thrift::Client<::cpp2::PubSubStreamingService>::sync_complete_returnstre
}
tryResponse->response.emplace();
auto ew = folly::fibers::runInMainContext([&] {
return recv_wrapped_returnstream(returnState);
return recv_wrapped_returnstream(tryResponse->response.value(), returnState);
});
if (ew) {
tryResponse->response.emplaceException(std::move(ew));
Expand Down Expand Up @@ -515,7 +515,7 @@ apache::thrift::Client<::cpp2::PubSubStreamingService>::sync_complete_streamthro
}
tryResponse->response.emplace();
auto ew = folly::fibers::runInMainContext([&] {
return recv_wrapped_streamthrows(returnState);
return recv_wrapped_streamthrows(tryResponse->response.value(), returnState);
});
if (ew) {
tryResponse->response.emplaceException(std::move(ew));
Expand Down Expand Up @@ -749,7 +749,7 @@ apache::thrift::Client<::cpp2::PubSubStreamingService>::sync_complete_servicethr
}
tryResponse->response.emplace();
auto ew = folly::fibers::runInMainContext([&] {
return recv_wrapped_servicethrows(returnState);
return recv_wrapped_servicethrows(tryResponse->response.value(), returnState);
});
if (ew) {
tryResponse->response.emplaceException(std::move(ew));
Expand Down Expand Up @@ -983,7 +983,7 @@ apache::thrift::Client<::cpp2::PubSubStreamingService>::sync_complete_servicethr
}
tryResponse->response.emplace();
auto ew = folly::fibers::runInMainContext([&] {
return recv_wrapped_servicethrows2(returnState);
return recv_wrapped_servicethrows2(tryResponse->response.value(), returnState);
});
if (ew) {
tryResponse->response.emplaceException(std::move(ew));
Expand Down Expand Up @@ -1217,7 +1217,7 @@ apache::thrift::Client<::cpp2::PubSubStreamingService>::sync_complete_boththrows
}
tryResponse->response.emplace();
auto ew = folly::fibers::runInMainContext([&] {
return recv_wrapped_boththrows(returnState);
return recv_wrapped_boththrows(tryResponse->response.value(), returnState);
});
if (ew) {
tryResponse->response.emplaceException(std::move(ew));
Expand Down Expand Up @@ -1451,7 +1451,7 @@ apache::thrift::Client<::cpp2::PubSubStreamingService>::sync_complete_responsean
}
tryResponse->response.emplace();
auto ew = folly::fibers::runInMainContext([&] {
return recv_wrapped_responseandstreamstreamthrows(returnState);
return recv_wrapped_responseandstreamstreamthrows(tryResponse->response.value(), returnState);
});
if (ew) {
tryResponse->response.emplaceException(std::move(ew));
Expand Down Expand Up @@ -1685,7 +1685,7 @@ apache::thrift::Client<::cpp2::PubSubStreamingService>::sync_complete_responsean
}
tryResponse->response.emplace();
auto ew = folly::fibers::runInMainContext([&] {
return recv_wrapped_responseandstreamservicethrows(returnState);
return recv_wrapped_responseandstreamservicethrows(tryResponse->response.value(), returnState);
});
if (ew) {
tryResponse->response.emplaceException(std::move(ew));
Expand Down Expand Up @@ -1919,7 +1919,7 @@ apache::thrift::Client<::cpp2::PubSubStreamingService>::sync_complete_responsean
}
tryResponse->response.emplace();
auto ew = folly::fibers::runInMainContext([&] {
return recv_wrapped_responseandstreamboththrows(returnState);
return recv_wrapped_responseandstreamboththrows(tryResponse->response.value(), returnState);
});
if (ew) {
tryResponse->response.emplaceException(std::move(ew));
Expand Down

0 comments on commit a4e27f9

Please sign in to comment.