From 563ec5324f60b8ea521b41a1a440735b8bf6d2a6 Mon Sep 17 00:00:00 2001 From: Alexander Polcyn Date: Wed, 15 Mar 2017 15:54:49 -0700 Subject: stop mixing gpr mutexes and the ruby gil to fix channel closing deadlock --- src/ruby/end2end/channel_closing_client.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/ruby/end2end') diff --git a/src/ruby/end2end/channel_closing_client.rb b/src/ruby/end2end/channel_closing_client.rb index 88fa9ae5e6..a9df078421 100755 --- a/src/ruby/end2end/channel_closing_client.rb +++ b/src/ruby/end2end/channel_closing_client.rb @@ -36,9 +36,8 @@ class ChannelClosingClientController < ClientControl::ClientController::Service @ch = ch end def shutdown(_, _) - STDERR.puts "about to close channel" @ch.close - STDERR.puts "just closed channel" + ClientControl::Void.new end end @@ -63,12 +62,13 @@ def main srv.run end - # this should break out once the channel is closed + # this should break out with an exception once the channel is closed loop do - state = ch.connectivity_state(true) begin + state = ch.connectivity_state(true) ch.watch_connectivity_state(state, Time.now + 360) - rescue RuntimeException => e + rescue RuntimeError => e + STDERR.puts "(expected) error occurred: #{e.inspect}" break end end -- cgit v1.2.3