aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/server/server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpp/server/server.cc')
-rw-r--r--src/cpp/server/server.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc
index ee9a1daa8e..8fffea640f 100644
--- a/src/cpp/server/server.cc
+++ b/src/cpp/server/server.cc
@@ -163,10 +163,11 @@ class Server::SyncRequest final : public CompletionQueueTag {
this));
}
- void FinalizeResult(void** tag, bool* status) override {
+ bool FinalizeResult(void** tag, bool* status) override {
if (!*status) {
grpc_completion_queue_destroy(cq_);
}
+ return true;
}
class CallData final {
@@ -310,11 +311,11 @@ class Server::AsyncRequest final : public CompletionQueueTag {
grpc_metadata_array_destroy(&array_);
}
- void FinalizeResult(void** tag, bool* status) override {
+ bool FinalizeResult(void** tag, bool* status) override {
*tag = tag_;
if (*status && request_) {
if (payload_) {
- *status = *status && DeserializeProto(payload_, request_);
+ *status = DeserializeProto(payload_, request_);
} else {
*status = false;
}
@@ -331,8 +332,10 @@ class Server::AsyncRequest final : public CompletionQueueTag {
}
ctx_->call_ = call_;
Call call(call_, server_, cq_);
+ // just the pointers inside call are copied here
stream_->BindCall(&call);
delete this;
+ return true;
}
private: