Remove thenReturn that fetches unused values

Closes gh-34883

Signed-off-by: ChanHyeongLee <cksgud410@gmail.com>
This commit is contained in:
ChanHyeongLee
2025-05-12 19:00:05 +09:00
committed by rstoyanchev
parent 263af04508
commit 4f5e2eefe9

View File

@@ -219,7 +219,7 @@ public class R2dbcTransactionManager extends AbstractReactiveTransactionManager
if (txObject.isNewConnectionHolder()) {
synchronizationManager.bindResource(obtainConnectionFactory(), txObject.getConnectionHolder());
}
}).thenReturn(con).onErrorResume(ex -> {
}).onErrorResume(ex -> {
if (txObject.isNewConnectionHolder()) {
return ConnectionFactoryUtils.releaseConnection(con, obtainConnectionFactory())
.doOnTerminate(() -> txObject.setConnectionHolder(null, false))