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:
parent
b8cd80550f
commit
9ea68721ac
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue