Fixed "connection lost" issue with the bundled Ruby/MySQL driver (would kill...

Fixed "connection lost" issue with the bundled Ruby/MySQL driver (would kill the app after 8 hours of inactivity) #2163, #428 [kajism@yahoo.com]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2182 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 8aa63a78
*SVN*
* Fixed "connection lost" issue with the bundled Ruby/MySQL driver (would kill the app after 8 hours of inactivity) #2163, #428 [kajism@yahoo.com]
* Fixed comparison of Active Record objects so two new objects are not equal #2099 [deberg]
* Fixed that the SQL Server adapter would sometimes return DBI::Timestamp objects instead of Time #2127 [Tom Ward]
......
......@@ -1022,6 +1022,9 @@ def read()
end
@sock.sync = true
buf.join
rescue
errno = Error::CR_SERVER_LOST
raise Error::new(errno, Error::err(errno))
end
def write(data)
......@@ -1039,6 +1042,9 @@ def write(data)
@pkt_nr = @pkt_nr + 1 & 0xff
@sock.sync = true
@sock.flush
rescue
errno = Error::CR_SERVER_LOST
raise Error::new(errno, Error::err(errno))
end
def close()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册