1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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
This commit is contained in:
Jeremy Kemper 2007-02-26 21:40:50 +00:00
parent b8cd80550f
commit 9ea68721ac

View file

@ -1174,7 +1174,11 @@ class << Mysql
def finalizer(net) def finalizer(net)
proc { proc {
net.clear 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 end