ENT-6584: Move sending of events to finally block. This makes sure it… (#4383) (#7057)

* ENT-6584: Move sending of events to finally block. This makes sure it gets executed in event of an exception.
This commit is contained in:
Adel El-Beik 2022-02-08 10:32:12 +00:00 committed by GitHub
parent 30786fb681
commit 76366398fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,12 +112,11 @@ class DatabaseTransaction(
} finally {
clearException()
contextTransactionOrNull = outerTransaction
}
if (outerTransaction == null) {
synchronized(this) {
closed = true
boundary.onNext(CordaPersistence.Boundary(id, committed))
if (outerTransaction == null) {
synchronized(this) {
closed = true
boundary.onNext(CordaPersistence.Boundary(id, committed))
}
}
}
}