diff --git a/lib/puma/binder.rb b/lib/puma/binder.rb index 0c209e4772..7507c92af1 100644 --- a/lib/puma/binder.rb +++ b/lib/puma/binder.rb @@ -96,6 +96,7 @@ def create_inherited_fds(env_hash) # @version 5.0.0 # def create_activated_fds(env_hash) + @events.debug "ENV['LISTEN_FDS'] #{ENV['LISTEN_FDS'].inspect} env_hash['LISTEN_PID'] #{env_hash['LISTEN_PID'].inspect}" return [] unless env_hash['LISTEN_FDS'] && env_hash['LISTEN_PID'].to_i == $$ env_hash['LISTEN_FDS'].to_i.times do |index| sock = TCPServer.for_fd(socket_activation_fd(index)) @@ -189,7 +190,8 @@ def parse(binds, logger, log_msg = 'Listening') @unix_paths << path unless abstract io = inherit_unix_listener path, fd logger.log "* Inherited #{str}" - elsif sock = @activated_sockets.delete([ :unix, path ]) + elsif sock = @activated_sockets.delete([ :unix, path ]) || + @activated_sockets.delete([ :unix, File.realdirpath(path) ]) @unix_paths << path unless abstract || File.exist?(path) io = inherit_unix_listener path, sock logger.log "* Activated #{str}"