[tor-commits] [metrics-web/master] Sleep rather than wait.

karsten at torproject.org karsten at torproject.org
Tue Feb 6 16:33:14 UTC 2018


commit fd132b88376476b2cc844aa4b6ee4aecfbf616ac
Author: Karsten Loesing <karsten.loesing at gmx.net>
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();



More information about the tor-commits mailing list