diff --git a/lib/drb/drb.rb b/lib/drb/drb.rb index 1ed5605007..e7a8d20211 100644 --- a/lib/drb/drb.rb +++ b/lib/drb/drb.rb @@ -1467,13 +1467,12 @@ module DRb if Thread.current['DRb'] && Thread.current['DRb']['server'] == self Thread.current['DRb']['stop_service'] = true else - threads = [@thread, *@grp.list] if @protocol.respond_to? :shutdown @protocol.shutdown else - threads.each {|thread| thread.kill} # xxx: Thread#kill + [@thread, *@grp.list].each {|thread| thread.kill} # xxx: Thread#kill end - threads.each {|thread| thread.join} + @thread.join end end