提交 7feb3cfa authored 作者: Noel Grandin's avatar Noel Grandin

vmlens: fix race condition on JdbcConnection.executingStatement

上级 c9242853
...@@ -361,6 +361,7 @@ public class JdbcConnection extends TraceObject implements Connection, ...@@ -361,6 +361,7 @@ public class JdbcConnection extends TraceObject implements Connection,
} }
CloseWatcher.unregister(watcher); CloseWatcher.unregister(watcher);
session.cancel(); session.cancel();
synchronized (session) {
if (executingStatement != null) { if (executingStatement != null) {
try { try {
executingStatement.cancel(); executingStatement.cancel();
...@@ -368,7 +369,6 @@ public class JdbcConnection extends TraceObject implements Connection, ...@@ -368,7 +369,6 @@ public class JdbcConnection extends TraceObject implements Connection,
// ignore // ignore
} }
} }
synchronized (session) {
try { try {
if (!session.isClosed()) { if (!session.isClosed()) {
try { try {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论