aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Yang Gao <yangg@google.com>2015-12-16 09:52:47 -0800
committerGravatar Yang Gao <yangg@google.com>2015-12-16 09:52:47 -0800
commit5ff97a27a9a6d6516b9a2fa36c8e9995b0e05a59 (patch)
treefc7813f8b582dcd7b2cfcce1c4ffda39216eeed0 /src
parent9e38c21b65736d7b484f7c7369d44b1e6f7f200d (diff)
parentca9a6378779e1bbee61b43eaa5e17a80c001da27 (diff)
Merge pull request #4479 from ctiller/aarons-bug
Fix double read at end of stream bug
Diffstat (limited to 'src')
-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 55aad9e8ac..f8dde0748b 100644
--- a/src/core/surface/call.c
+++ b/src/core/surface/call.c
@@ -1068,6 +1068,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);
}
@@ -1078,6 +1079,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);
}