aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-12-15 18:16:28 -0800
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-12-15 18:16:28 -0800
commitca9a6378779e1bbee61b43eaa5e17a80c001da27 (patch)
tree70b9f8ef7e4a9b6d04d7a54ac47d99f65f5070e7 /src/core
parent8ccebc403fe4be49eb13aab12bf97f36afee511c (diff)
Fix double read at end of stream bug
Diffstat (limited to 'src/core')
-rw-r--r--src/core/surface/call.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/surface/call.c b/src/core/surface/call.c
index a162d99193..d18319a97d 100644
--- a/src/core/surface/call.c
+++ b/src/core/surface/call.c
@@ -1060,6 +1060,7 @@ static void receiving_stream_ready(grpc_exec_ctx *exec_ctx, void *bctlp,
if (call->receiving_stream == NULL) {
*call->receiving_buffer = NULL;
+ call->receiving_message = 0;
if (gpr_unref(&bctl->steps_to_complete)) {
post_batch_completion(exec_ctx, bctl);
}
@@ -1070,6 +1071,7 @@ static void receiving_stream_ready(grpc_exec_ctx *exec_ctx, void *bctlp,
grpc_byte_stream_destroy(call->receiving_stream);
call->receiving_stream = NULL;
*call->receiving_buffer = NULL;
+ call->receiving_message = 0;
if (gpr_unref(&bctl->steps_to_complete)) {
post_batch_completion(exec_ctx, bctl);
}