Whitespace and formatting fixes.
[jFCPlib.git] / src / net / pterodactylus / fcp / highlevel / HighLevelCallback.java
index 541e502..7dc55df 100644 (file)
@@ -30,7 +30,6 @@ import java.util.List;
  * @param <R>
  *            The type of the high-level operation result
  * @author David ‘Bombe’ Roden &lt;bombe@freenetproject.org&gt;
- * @version $Id$
  */
 public class HighLevelCallback<R extends HighLevelResult> {
 
@@ -135,7 +134,7 @@ public class HighLevelCallback<R extends HighLevelResult> {
         */
        public R getResult(long waitTime) throws InterruptedException {
                synchronized (syncObject) {
-                       if (!resultComplete) {
+                       while (!resultComplete) {
                                syncObject.wait(waitTime);
                        }
                        return result;
@@ -163,7 +162,7 @@ public class HighLevelCallback<R extends HighLevelResult> {
                                return;
                        }
                        resultComplete = true;
-                       syncObject.notify();
+                       syncObject.notifyAll();
                }
                fireGotResult();
        }