Skip to content

Commit

Permalink
fix a problem in passenger and add protection for potential issues in…
Browse files Browse the repository at this point in the history
… greyhole conf
  • Loading branch information
cpg committed Aug 2, 2014
1 parent 740a798 commit 65fce5e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/pooling/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ def self.part_path(p)
end

def self.header
gh = GH_DEFAULTS
# we have to use a dup here because the changes in gh affect the constant and apparently
# passenger does not reload the constant on future requests or maybe a worker was
# was not initialized properly. in any case, modifying a constant is not good form
gh = GH_DEFAULTS.dup
begin
gh.merge!(YAML::load(File.open(GH_DEFAULTS_FILE))) if File.exists?(GH_DEFAULTS_FILE)
rescue
Expand Down Expand Up @@ -128,6 +131,7 @@ def self.header
def self.sticky_files_to_s(data)
# new format!
res = []
return ret unless data
data.map do |entry|
pattern = entry[0]
into = entry[1]
Expand Down

0 comments on commit 65fce5e

Please sign in to comment.