mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
Don't call stopped.get() outside the lock.
This commit is contained in:
@@ -29,11 +29,12 @@ class DatabaseCleanerImpl implements DatabaseCleaner, Runnable {
|
||||
|
||||
public void run() {
|
||||
try {
|
||||
while(!stopped.get()) {
|
||||
while(true) {
|
||||
if(callback.shouldCheckFreeSpace()) {
|
||||
callback.checkFreeSpaceAndClean();
|
||||
} else {
|
||||
synchronized(stopped) {
|
||||
if(stopped.get()) break;
|
||||
try {
|
||||
stopped.wait(msBetweenSweeps);
|
||||
} catch(InterruptedException ignored) {}
|
||||
|
||||
Reference in New Issue
Block a user