提交 ac5a6c06 authored 作者: Thomas Mueller's avatar Thomas Mueller

Connection.isValid is a bit faster.

上级 c080d3a7
......@@ -1420,7 +1420,10 @@ public class JdbcConnection extends TraceObject implements Connection {
public synchronized boolean isValid(int timeout) {
try {
debugCodeCall("isValid", timeout);
checkClosed();
if (session == null || session.isClosed()) {
return false;
}
// force a network round trip (if networked)
getInternalAutoCommit();
return true;
} catch (Exception e) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论