Skip to content

Commit

Permalink
If a reload fails, clear Einhorn::State.reloading_for_preload_upgrade.
Browse files Browse the repository at this point in the history
If a reload failed, this was causing further SIGALRMs to not bother
reloading, since they thought we were already doing so. In conjunction
with preloading, this meant we would never upgrade our workers.
  • Loading branch information
nelhage committed Jan 29, 2013
1 parent 356d254 commit 27f5313
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/einhorn/command.rb
Expand Up @@ -200,6 +200,7 @@ def self.reload
exec [Einhorn::TransientState.script_name, Einhorn::TransientState.script_name], *(['--with-state-fd', read.fileno.to_s, '--'] + Einhorn::State.cmd)
rescue SystemCallError => e
Einhorn.log_error("Could not reload! Attempting to continue. Error was: #{e}")
Einhorn::State.reloading_for_preload_upgrade = false
read.close
end
end
Expand Down

0 comments on commit 27f5313

Please sign in to comment.