aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2015-08-04 16:36:22 -0700
committerGravatar yang-g <yangg@google.com>2015-08-04 16:36:22 -0700
commitd45a26ed06dfeafa41f49d17fe42a2f637ad6742 (patch)
tree9ada01d183a10b794969ee3ca27df69779cbf587 /include/grpc++
parent5239ee2bd0a035ad7ac94b259b318677869126ad (diff)
allow null tag
Diffstat (limited to 'include/grpc++')
-rw-r--r--include/grpc++/server_context.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/grpc++/server_context.h b/include/grpc++/server_context.h
index 03d2f0d128..23273f43e6 100644
--- a/include/grpc++/server_context.h
+++ b/include/grpc++/server_context.h
@@ -128,7 +128,10 @@ class ServerContext {
// Async only. Has to be called before the rpc starts.
// Returns the tag in completion queue when the rpc finishes.
// IsCancelled() can then be called to check whether the rpc was cancelled.
- void AsyncNotifyWhenDone(void* tag) { async_notify_when_done_tag_ = tag; }
+ void AsyncNotifyWhenDone(void* tag) {
+ has_notify_when_done_tag_ = true;
+ async_notify_when_done_tag_ = tag;
+ }
private:
friend class ::grpc::testing::InteropContextInspector;
@@ -170,6 +173,7 @@ class ServerContext {
void set_call(grpc_call* call);
CompletionOp* completion_op_;
+ bool has_notify_when_done_tag_;
void* async_notify_when_done_tag_;
gpr_timespec deadline_;