Skip to content

Commit

Permalink
Fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Melchior committed Nov 1, 2023
1 parent 0accea3 commit 6561006
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,7 @@ public class RealmImpl private constructor(
// TODO Reconsider this constraint. We have the primitives to check is we are on the
// writer thread and just close the realm in writer.close()
writer.checkInTransaction("Cannot close the Realm while inside a transaction block")
realmReferenceLock.withLock {
if (isClosed()) {
return
}
isClosed.value = true
if (!isClosed.getAndSet(true)) {
runBlocking {
writer.close()
realmScope.cancel()
Expand Down

0 comments on commit 6561006

Please sign in to comment.