diff options
author | Matthew Draper <matthew@trebex.net> | 2018-01-25 00:39:07 +1030 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2018-01-25 01:01:51 +1030 |
commit | 1280ad6d19fa56e9bf6d6a261c1231326cb3d8c3 (patch) | |
tree | a5087cd2d1c8fb92cb9350815cd748f5e7e7feac /activerecord/lib | |
parent | ee1fda121effe791676460d72cf1bcaafe052e22 (diff) | |
download | rails-1280ad6d19fa56e9bf6d6a261c1231326cb3d8c3.tar.gz rails-1280ad6d19fa56e9bf6d6a261c1231326cb3d8c3.tar.bz2 rails-1280ad6d19fa56e9bf6d6a261c1231326cb3d8c3.zip |
Make discard safe when it follows a manual disconnect
It doesn't have to do anything, but it shouldn't fail.
Fixes #31766.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index ddc5a91286..dc6287e32c 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -281,7 +281,7 @@ module ActiveRecord end def discard! # :nodoc: - @connection.socket_io.reopen(IO::NULL) + @connection.socket_io.reopen(IO::NULL) rescue nil @connection = nil end |