diff options
author | Alexander Polcyn <apolcyn@google.com> | 2017-03-15 15:54:49 -0700 |
---|---|---|
committer | Alexander Polcyn <apolcyn@google.com> | 2017-03-15 15:54:49 -0700 |
commit | 563ec5324f60b8ea521b41a1a440735b8bf6d2a6 (patch) | |
tree | 3185c46e4955d52edbcb8ce1f0367f2457f9d176 /src/ruby/end2end | |
parent | 70bc4921e15f813c118477e26ea4bc5267b5c7e0 (diff) |
stop mixing gpr mutexes and the ruby gil to fix channel closing deadlock
Diffstat (limited to 'src/ruby/end2end')
-rwxr-xr-x | src/ruby/end2end/channel_closing_client.rb | 10 |
1 files changed, 5 insertions, 5 deletions
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 |