lib/redis_failover/runner.rb in redis_failover-0.8.9 vs lib/redis_failover/runner.rb in redis_failover-0.9.0

- old
+ new

@@ -8,19 +8,20 @@ # Node Manager is gracefully stopped def self.run(options) options = CLI.parse(options) @node_manager = NodeManager.new(options) trap_signals - node_manager_thread = Thread.new { @node_manager.start } - node_manager_thread.join + @node_manager_thread = Thread.new { @node_manager.start } + @node_manager_thread.join end # Traps shutdown signals. def self.trap_signals [:INT, :TERM].each do |signal| trap(signal) do Util.logger.info('Shutting down ...') @node_manager.shutdown + @node_manager_thread.join exit(0) end end end end