diff options
author | 2018-11-05 13:26:26 -0800 | |
---|---|---|
committer | 2018-11-06 11:20:50 -0800 | |
commit | 526d2e6004636156dbd9f2c56b51f428d3e5ab14 (patch) | |
tree | 50ea6db28cc6c14a4168b9d45f6c3cef2f859d55 /include/grpcpp/impl/codegen/server_callback.h | |
parent | 56dbef813e4c9e2e74f001b0d5d81114abf78d4b (diff) |
Refactoring of CallbackWithSuccessTag
Diffstat (limited to 'include/grpcpp/impl/codegen/server_callback.h')
-rw-r--r-- | include/grpcpp/impl/codegen/server_callback.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/grpcpp/impl/codegen/server_callback.h b/include/grpcpp/impl/codegen/server_callback.h index 5d56cbf1df..b866fc16dc 100644 --- a/include/grpcpp/impl/codegen/server_callback.h +++ b/include/grpcpp/impl/codegen/server_callback.h @@ -22,6 +22,7 @@ #include <functional> #include <grpcpp/impl/codegen/call.h> +#include <grpcpp/impl/codegen/call_op_set.h> #include <grpcpp/impl/codegen/callback_common.h> #include <grpcpp/impl/codegen/config.h> #include <grpcpp/impl/codegen/core_codegen_interface.h> @@ -116,7 +117,7 @@ class CallbackUnaryHandler : public MethodHandler { : public experimental::ServerCallbackRpcController { public: void Finish(Status s) override { - finish_tag_ = CallbackWithSuccessTag( + finish_tag_.Set( call_.call(), [this](bool) { grpc_call* call = call_.call(); @@ -149,8 +150,7 @@ class CallbackUnaryHandler : public MethodHandler { void SendInitialMetadata(std::function<void(bool)> f) override { GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); - meta_tag_ = - CallbackWithSuccessTag(call_.call(), std::move(f), &meta_buf_); + meta_tag_.Set(call_.call(), std::move(f), &meta_buf_); meta_buf_.SendInitialMetadata(&ctx_->initial_metadata_, ctx_->initial_metadata_flags()); if (ctx_->compression_level_set()) { |