xiaoxiangyeyu0 commented on code in PR #7102: URL: https://github.com/apache/incubator-seata/pull/7102#discussion_r1912892414
########## rm-datasource/src/main/java/org/apache/seata/rm/datasource/xa/ConnectionProxyXA.java: ########## @@ -324,13 +308,41 @@ private void checkTimeout(Long now) throws XAException { @Override public synchronized void close() throws SQLException { - rollBacked = false; - if (isHeld() && shouldBeHeld()) { - // if kept by a keeper, just hold the connection. - return; + try { + if (xaEnded) { + termination(); + long now = System.currentTimeMillis(); + checkTimeout(now); + setPrepareTime(now); + int prepare = xaResource.prepare(xaBranchXid); Review Comment: rollback方法的finally会调用cleanXABranchContext,这里会把xaEnded置为false -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org