diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-02-26 21:40:50 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-02-26 21:40:50 +0000 |
commit | 9ea68721ac32ed4d0868b7efaeae62d80fd180a3 (patch) | |
tree | 789dccb5ad18392275de30c4115e86c7f1e44d86 /activerecord | |
parent | b8cd80550f541a2becafa29f926b1c2667b7b650 (diff) | |
download | rails-9ea68721ac32ed4d0868b7efaeae62d80fd180a3.tar.gz rails-9ea68721ac32ed4d0868b7efaeae62d80fd180a3.tar.bz2 rails-9ea68721ac32ed4d0868b7efaeae62d80fd180a3.zip |
mysql.rb ignores IOError in finalizer when socket is already closed
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6241 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/vendor/mysql.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/vendor/mysql.rb b/activerecord/lib/active_record/vendor/mysql.rb index 85ded2bc94..1c3294c719 100644 --- a/activerecord/lib/active_record/vendor/mysql.rb +++ b/activerecord/lib/active_record/vendor/mysql.rb @@ -1174,7 +1174,11 @@ class << Mysql def finalizer(net) proc { net.clear - net.write Mysql::COM_QUIT.chr + begin + net.write(Mysql::COM_QUIT.chr) + net.close + rescue # Ignore IOError if socket is already closed. + end } end |