diff options
author | Craig Tiller <ctiller@google.com> | 2017-01-26 12:34:14 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-01-26 12:34:14 -0800 |
commit | f5ffddcff23ceb5f562a155f5a823770a6fcb590 (patch) | |
tree | d24e29192c634808e499398fc3a266235167b6bd /src/core/lib/surface/call.c | |
parent | afceb2edbd909757d6e6c0f3d1d25b8d50893220 (diff) |
Fix error handling
Diffstat (limited to 'src/core/lib/surface/call.c')
-rw-r--r-- | src/core/lib/surface/call.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index a4e4ce457b..e8a93b91bf 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1225,7 +1225,7 @@ static void add_batch_error(grpc_exec_ctx *exec_ctx, batch_control *bctl, grpc_error *error) { if (error == GRPC_ERROR_NONE) return; int idx = (int)gpr_atm_no_barrier_fetch_add(&bctl->num_errors, 1); - if (idx > 0) cancel_with_error(exec_ctx, bctl->call, GRPC_ERROR_REF(error)); + if (idx == 0) cancel_with_error(exec_ctx, bctl->call, GRPC_ERROR_REF(error)); bctl->errors[idx] = error; } |