提交 9ea68721 编写于 作者: J Jeremy Kemper

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
上级 b8cd8055
......@@ -1174,7 +1174,11 @@ def real_connect(*args)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册