Skip to content

Commit

Permalink
Corrects bad return values in C error-handling block
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Emiola committed Apr 24, 2015
1 parent 9cb56f8 commit 932b13b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ruby/ext/grpc/rb_call.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,19 +607,19 @@ static VALUE grpc_rb_call_run_batch(VALUE self, VALUE cqueue, VALUE tag,
rb_raise(grpc_rb_eCallError,
"grpc_call_start_batch failed with %s (code=%d)",
grpc_call_error_detail_of(err), err);
return;
return Qnil;
}
ev = grpc_rb_completion_queue_pluck_event(cqueue, tag, timeout);
if (ev == NULL) {
grpc_run_batch_stack_cleanup(&st);
rb_raise(grpc_rb_eOutOfTime, "grpc_call_start_batch timed out");
return;
return Qnil;
}
if (ev->data.op_complete != GRPC_OP_OK) {
grpc_run_batch_stack_cleanup(&st);
rb_raise(grpc_rb_eCallError, "start_batch completion failed, (code=%d)",
ev->data.op_complete);
return;
return Qnil;
}

/* Build and return the BatchResult struct result */
Expand Down

0 comments on commit 932b13b

Please sign in to comment.