Skip to content

Commit

Permalink
Had some logic backwards in the new dispatch.fcgi handler
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1540 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jamis committed Jun 27, 2005
1 parent ef8bd07 commit 5205e08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions railties/dispatches/dispatch.fcgi
Expand Up @@ -22,7 +22,7 @@ class RailsFCGIHandler
trap("USR1", trap_handler)

# initialize to 11 seconds from now to minimize special cases
@last_error_on = Time.now + 11
@last_error_on = Time.now - 11

@log_file_path = log_file_path
dispatcher_log(:info, "fcgi #{$$} starting")
Expand All @@ -42,7 +42,7 @@ class RailsFCGIHandler
rescue Object => fcgi_error
# retry on errors that would otherwise have terminated the FCGI process,
# but only if they occur more than 10 seconds apart.
if !(SignalException === fcgi_error) && @last_error_on - Time.now > 10
if !(SignalException === fcgi_error) && Time.now - @last_error_on > 10
@last_error_on = Time.now
dispatcher_error(fcgi_error,
"FCGI process #{$$} almost killed by this error\n")
Expand Down

0 comments on commit 5205e08

Please sign in to comment.