提交 bbac6fdb authored 作者: Andrei Tokar's avatar Andrei Tokar

remove noop second rollback and second close, to make closure process more atomic

上级 239baa66
......@@ -183,23 +183,12 @@ public class TcpServerThread implements Runnable {
private void closeSession() {
if (session != null) {
RuntimeException closeError = null;
try {
Command rollback = session.prepareLocal("ROLLBACK");
rollback.executeUpdate(false);
} catch (RuntimeException e) {
closeError = e;
server.traceError(e);
} catch (Exception e) {
server.traceError(e);
}
try {
session.close();
server.removeConnection(threadId);
} catch (RuntimeException e) {
if (closeError == null) {
closeError = e;
server.traceError(e);
}
closeError = e;
server.traceError(e);
} catch (Exception e) {
server.traceError(e);
} finally {
......@@ -544,7 +533,6 @@ public class TcpServerThread implements Runnable {
}
default:
trace("Unknown operation: " + operation);
closeSession();
close();
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论