diff --git a/briar-desktop/src/org/briarproject/plugins/file/PollingRemovableDriveMonitor.java b/briar-desktop/src/org/briarproject/plugins/file/PollingRemovableDriveMonitor.java index 375e22d5af7df4e678b4b107c10c26308ef9a0ae..4ca9e3ce66fcd30bbe931774f0849aa25784b822 100644 --- a/briar-desktop/src/org/briarproject/plugins/file/PollingRemovableDriveMonitor.java +++ b/briar-desktop/src/org/briarproject/plugins/file/PollingRemovableDriveMonitor.java @@ -22,8 +22,8 @@ class PollingRemovableDriveMonitor implements RemovableDriveMonitor, Runnable { private volatile boolean running = false; private volatile Callback callback = null; - private final Lock synchLock = new ReentrantLock(); - private final Condition stopPolling = synchLock.newCondition(); + private final Lock pollingLock = new ReentrantLock(); + private final Condition stopPolling = pollingLock.newCondition(); public PollingRemovableDriveMonitor(Executor ioExecutor, @@ -41,12 +41,12 @@ class PollingRemovableDriveMonitor implements RemovableDriveMonitor, Runnable { public void stop() throws IOException { running = false; - synchLock.lock(); + pollingLock.lock(); try { stopPolling.signalAll(); } finally { - synchLock.unlock(); + pollingLock.unlock(); } } @@ -54,12 +54,12 @@ class PollingRemovableDriveMonitor implements RemovableDriveMonitor, Runnable { try { Collection<File> drives = finder.findRemovableDrives(); while(running) { - synchLock.lock(); + pollingLock.lock(); try { stopPolling.await(pollingInterval, TimeUnit.MILLISECONDS); } finally{ - synchLock.unlock(); + pollingLock.unlock(); } if(!running) return; Collection<File> newDrives = finder.findRemovableDrives();