r1616@asus: jeremy | 2005-07-03 08:07:13 -0700

remove duplicate conditional


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1634 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
Jeremy Kemper
2005-07-03 08:32:52 +00:00
parent 9a10b31fe8
commit 94cd3fd135

View File

@@ -120,10 +120,10 @@ module ActiveRecord
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