Skip to content

Commit

Permalink
r1616@asus: jeremy | 2005-07-03 08:07:13 -0700
Browse files Browse the repository at this point in the history
 remove duplicate conditional


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1634 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
jeremy committed Jul 3, 2005
1 parent 9a10b31 commit 94cd3fd
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -120,10 +120,10 @@ def execute(sql, name = nil, retries = 2)
rescue ActiveRecord::StatementInvalid => exception
if LOST_CONNECTION_ERROR_MESSAGES.any? { |msg| exception.message.split(":").first =~ /^#{msg}/ }
@connection.real_connect(*@connection_options)
@logger.info("Retrying invalid statement with reopened connection") if @logger
unless @logger
@connection.query(sql)
else
@logger.info "Retrying invalid statement with reopened connection"
log(sql, name) { @connection.query(sql) }
end
else
Expand Down

0 comments on commit 94cd3fd

Please sign in to comment.