aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/ruby/.rubocop.yml6
-rw-r--r--src/ruby/lib/grpc/generic/rpc_server.rb2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/ruby/.rubocop.yml b/src/ruby/.rubocop.yml
index 312bdca384..dd57ab6082 100644
--- a/src/ruby/.rubocop.yml
+++ b/src/ruby/.rubocop.yml
@@ -9,3 +9,9 @@ AllCops:
- 'bin/math_services.rb'
- 'pb/grpc/health/v1alpha/*'
- 'pb/test/**/*'
+
+Metrics/CyclomaticComplexity:
+ Max: 8
+
+Metrics/PerceivedComplexity:
+ Max: 8
diff --git a/src/ruby/lib/grpc/generic/rpc_server.rb b/src/ruby/lib/grpc/generic/rpc_server.rb
index 3740ac52da..228c500672 100644
--- a/src/ruby/lib/grpc/generic/rpc_server.rb
+++ b/src/ruby/lib/grpc/generic/rpc_server.rb
@@ -416,6 +416,8 @@ module GRPC
until stopped?
begin
an_rpc = @server.request_call(@cq, loop_tag, INFINITE_FUTURE)
+ break if (!an_rpc.nil?) && an_rpc.call.nil?
+
c = new_active_server_call(an_rpc)
unless c.nil?
mth = an_rpc.method.to_sym