aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/postgresql
diff options
context:
space:
mode:
authorDylan Thacker-Smith <Dylan.Smith@shopify.com>2016-09-08 10:38:58 -0400
committerDylan Thacker-Smith <Dylan.Smith@shopify.com>2016-09-08 11:16:04 -0400
commit01adc45672672459c98880babb39ff5b357e1296 (patch)
tree31b2553b9664e1d7604659ef769b1782bd23e6fb /activerecord/test/cases/adapters/postgresql
parent087427e0d1f7baf804ae52e13dc55bfa78a50123 (diff)
downloadrails-01adc45672672459c98880babb39ff5b357e1296.tar.gz
rails-01adc45672672459c98880babb39ff5b357e1296.tar.bz2
rails-01adc45672672459c98880babb39ff5b357e1296.zip
activerecord/mysql2: Avoid setting @connection to nil, just close it
By doing `@connection = nil` that means that we need nil checks before it is used anywhere, but we weren't doing those checks. Instead, we get a NoMethodError after using a connection after it fails to reconnect. Neither of the other adapters set @connection to nil, just the mysql2 adapter. By just closing it, we avoid the need to check if we have a connection object and it will produce an appropriate exception when used.
Diffstat (limited to 'activerecord/test/cases/adapters/postgresql')
0 files changed, 0 insertions, 0 deletions