mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 05:39:53 +01:00
Use ReentrantLock as a lock (not a monitor) when marking DB as open.
This commit is contained in:
@@ -429,8 +429,11 @@ abstract class JdbcDatabase implements Database<Connection> {
|
|||||||
compactAndClose();
|
compactAndClose();
|
||||||
logDuration(LOG, "Compacting database", start);
|
logDuration(LOG, "Compacting database", start);
|
||||||
// Allow the next transaction to reopen the DB
|
// Allow the next transaction to reopen the DB
|
||||||
synchronized (connectionsLock) {
|
connectionsLock.lock();
|
||||||
|
try {
|
||||||
closed = false;
|
closed = false;
|
||||||
|
} finally {
|
||||||
|
connectionsLock.unlock();
|
||||||
}
|
}
|
||||||
txn = startTransaction();
|
txn = startTransaction();
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user