#1169 - Memory leak - DefaultTransactionThreadLocal holding reference to transaction

This commit is contained in:
Rob Bygrave
2017-10-16 22:14:48 +13:00
parent f6e5446dab
commit 6e2712ea49
2 changed files with 4 additions and 5 deletions
@@ -153,7 +153,7 @@ public class ScopeTrans implements Thread.UncaughtExceptionHandler {
}
protected void restoreSuspended() {
if (suspendedTransaction != null) {
if (created || suspendedTransaction != null) {
// put the previously suspended transaction
// back onto the ThreadLocal or equivalent
scopeMgr.replace(suspendedTransaction);