diff --git a/src/ruby/ext/grpc/rb_event.c b/src/ruby/ext/grpc/rb_event.c index a1ab6251c86..72c9dd2ec00 100644 --- a/src/ruby/ext/grpc/rb_event.c +++ b/src/ruby/ext/grpc/rb_event.c @@ -256,14 +256,6 @@ static VALUE grpc_rb_event_result(VALUE self) { event->data.finish_accepted); break; - case GRPC_INVOKE_ACCEPTED: - if (event->data.invoke_accepted == GRPC_OP_OK) { - return Qnil; - } - rb_raise(rb_eEventError, "invoke failed, not sure why (code=%d)", - event->data.invoke_accepted); - break; - case GRPC_WRITE_ACCEPTED: if (event->data.write_accepted == GRPC_OP_OK) { return Qnil; @@ -343,9 +335,8 @@ void Init_google_rpc_event() { rb_define_module_under(rb_mGoogleRpcCore, "CompletionType"); rb_define_const(rb_mCompletionType, "QUEUE_SHUTDOWN", INT2NUM(GRPC_QUEUE_SHUTDOWN)); + rb_define_const(rb_mCompletionType, "OP_COMPLETE", INT2NUM(GRPC_OP_COMPLETE)); rb_define_const(rb_mCompletionType, "READ", INT2NUM(GRPC_READ)); - rb_define_const(rb_mCompletionType, "INVOKE_ACCEPTED", - INT2NUM(GRPC_INVOKE_ACCEPTED)); rb_define_const(rb_mCompletionType, "WRITE_ACCEPTED", INT2NUM(GRPC_WRITE_ACCEPTED)); rb_define_const(rb_mCompletionType, "FINISH_ACCEPTED", diff --git a/src/ruby/spec/event_spec.rb b/src/ruby/spec/event_spec.rb index 7ef08d021bb..89acd4ba676 100644 --- a/src/ruby/spec/event_spec.rb +++ b/src/ruby/spec/event_spec.rb @@ -33,8 +33,8 @@ describe GRPC::Core::CompletionType do before(:each) do @known_types = { QUEUE_SHUTDOWN: 0, - READ: 1, - INVOKE_ACCEPTED: 2, + OP_COMPLETE: 1, + READ: 2, WRITE_ACCEPTED: 3, FINISH_ACCEPTED: 4, CLIENT_METADATA_READ: 5,