aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Abhishek Kumar <abhikumar@google.com>2015-05-08 12:56:32 -0700
committerGravatar Abhishek Kumar <abhikumar@google.com>2015-05-08 12:56:32 -0700
commitfe117723d0599ff990fb154acbc7856083d94c9e (patch)
tree890bd79d67bf28bbee2900b6e91dfd9d411f7ee7 /src/core
parent2bac1f8c39eb9d8b927e21f0f404958b2e8df37e (diff)
parent47838544e0b396ad59dbca16eae10367af8de151 (diff)
Merge pull request #1500 from ctiller/do-the-right-thing-put-it-in-a-bin
Throw away queued messages on error
Diffstat (limited to 'src/core')
-rw-r--r--src/core/surface/call.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/core/surface/call.c b/src/core/surface/call.c
index f3658b56c4..aa58fa13ed 100644
--- a/src/core/surface/call.c
+++ b/src/core/surface/call.c
@@ -375,18 +375,10 @@ void grpc_call_internal_unref(grpc_call *c, int allow_immediate_deletion) {
static void set_status_code(grpc_call *call, status_source source,
gpr_uint32 status) {
- int flush;
-
call->status[source].is_set = 1;
call->status[source].code = status;
- if (call->is_client) {
- flush = status == GRPC_STATUS_CANCELLED;
- } else {
- flush = status != GRPC_STATUS_OK;
- }
-
- if (flush && !grpc_bbq_empty(&call->incoming_queue)) {
+ if (status != GRPC_STATUS_OK && !grpc_bbq_empty(&call->incoming_queue)) {
grpc_bbq_flush(&call->incoming_queue);
}
}