diff --git a/lib/puma/cluster.rb b/lib/puma/cluster.rb index 88eff6bb..492db590 100644 --- a/lib/puma/cluster.rb +++ b/lib/puma/cluster.rb @@ -411,7 +411,7 @@ module Puma log "Early termination of worker" exit! 0 else - @launcher.send(:close_binder_listeners) + @launcher.close_binder_listeners stop_workers stop diff --git a/lib/puma/launcher.rb b/lib/puma/launcher.rb index b06558a8..8d3f5b50 100644 --- a/lib/puma/launcher.rb +++ b/lib/puma/launcher.rb @@ -214,6 +214,15 @@ module Puma end end + def close_binder_listeners + @binder.listeners.each do |l, io| + io.close + uri = URI.parse(l) + next unless uri.scheme == 'unix' + File.unlink("#{uri.host}#{uri.path}") + end + end + private def reload_worker_directory @@ -319,16 +328,6 @@ module Puma @options[:prune_bundler] && clustered? && !@options[:preload_app] end - def close_binder_listeners - @binder.listeners.each do |l, io| - io.close - uri = URI.parse(l) - next unless uri.scheme == 'unix' - File.unlink("#{uri.host}#{uri.path}") - end - end - - def generate_restart_data if dir = @options[:directory] @restart_dir = dir