aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2018-11-09 19:51:11 -0800
committerGravatar Yash Tibrewal <yashkt@google.com>2018-11-09 19:51:11 -0800
commit565edf529766e66b4394f59ff33a89211c92206a (patch)
tree70ddf009e941e8efd28b31acb5c9ec86b36772a8 /include
parent699c10386d6f0cbed7364e5a94144f0794f469d5 (diff)
Add safety checks
Diffstat (limited to 'include')
-rw-r--r--include/grpcpp/impl/codegen/interceptor_common.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/grpcpp/impl/codegen/interceptor_common.h b/include/grpcpp/impl/codegen/interceptor_common.h
index 4c881c783d..d23b71f8a7 100644
--- a/include/grpcpp/impl/codegen/interceptor_common.h
+++ b/include/grpcpp/impl/codegen/interceptor_common.h
@@ -160,7 +160,11 @@ class InterceptorBatchMethodsImpl
info->channel(), current_interceptor_index_ + 1));
}
- void FailHijackedRecvMessage() override { *got_message_ = false; }
+ void FailHijackedRecvMessage() override {
+ GPR_CODEGEN_ASSERT(hooks_[static_cast<size_t>(
+ experimental::InterceptionHookPoints::PRE_RECV_MESSAGE)]);
+ *got_message_ = false;
+ }
// Clears all state
void ClearState() {