aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ruby/lib
diff options
context:
space:
mode:
authorGravatar murgatroid99 <mlumish@google.com>2015-10-14 17:25:49 -0700
committerGravatar murgatroid99 <mlumish@google.com>2015-10-14 17:25:49 -0700
commit3c09a643326353ac403f0ec25ae4a795f57ceda9 (patch)
tree8d08ea6201c763f51125abf77e2ebe617290730b /src/ruby/lib
parent59e339b9d243a2962f37e4080ae2110d32989fd4 (diff)
Fixed previous change, altered RuboCop settings to let me do so
Diffstat (limited to 'src/ruby/lib')
-rw-r--r--src/ruby/lib/grpc/generic/rpc_server.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ruby/lib/grpc/generic/rpc_server.rb b/src/ruby/lib/grpc/generic/rpc_server.rb
index 8dfc9b6763..228c500672 100644
--- a/src/ruby/lib/grpc/generic/rpc_server.rb
+++ b/src/ruby/lib/grpc/generic/rpc_server.rb
@@ -416,13 +416,10 @@ 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)
- if c.nil?
- # With infinite timeout on request_call, a nil call implies that the
- # server has shut down. Waiting for another call at that point will
- # not accomplish anything.
- break
- else
+ unless c.nil?
mth = an_rpc.method.to_sym
@pool.schedule(c) do |call|
rpc_descs[mth].run_server_method(call, rpc_handlers[mth])