[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [metrics-web/release] Sleep rather than wait.
commit fd132b88376476b2cc844aa4b6ee4aecfbf616ac
Author: Karsten Loesing <karsten.loesing@xxxxxxx>
Date: Mon Jan 8 11:29:14 2018 +0100
Sleep rather than wait.
Fixes #24824.
---
.../java/org/torproject/metrics/web/CollectorDirectoryProvider.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/torproject/metrics/web/CollectorDirectoryProvider.java b/src/main/java/org/torproject/metrics/web/CollectorDirectoryProvider.java
index ecf716c..2960599 100644
--- a/src/main/java/org/torproject/metrics/web/CollectorDirectoryProvider.java
+++ b/src/main/java/org/torproject/metrics/web/CollectorDirectoryProvider.java
@@ -40,11 +40,11 @@ public class CollectorDirectoryProvider implements Runnable {
long waitingSinceMillis = System.currentTimeMillis();
do {
try {
- this.wait(200L);
+ Thread.sleep(200L);
} catch (InterruptedException e) {
/* Ignore. */
}
- } while (null == index.get()
+ } while (null == this.index.get()
&& System.currentTimeMillis() < waitingSinceMillis + 10000L);
}
return this.index.get();
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits