Connection may be `nil`.
This commit is contained in:
parent
057571d173
commit
d3003592cd
|
@ -56,7 +56,7 @@ class PostgreSQLFallbackHandler
|
|||
connection = ActiveRecord::Base.postgresql_connection(config)
|
||||
is_connection_active = connection.active?
|
||||
ensure
|
||||
connection.disconnect!
|
||||
connection.disconnect! if connection
|
||||
end
|
||||
|
||||
if is_connection_active
|
||||
|
|
Loading…
Reference in New Issue