implement some responses that finish a request
[jFCPlib.git] / src / net / pterodactylus / fcp / highlevel / HighLevelCallback.java
index 541e502..101e16d 100644 (file)
@@ -135,7 +135,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 +163,7 @@ public class HighLevelCallback<R extends HighLevelResult> {
                                return;
                        }
                        resultComplete = true;
-                       syncObject.notify();
+                       syncObject.notifyAll();
                }
                fireGotResult();
        }