fix java > 6 dep
authorNiki <david.roulet@uclouvain.be>
Fri, 22 Mar 2019 13:24:41 +0000 (14:24 +0100)
committerNiki <david.roulet@uclouvain.be>
Fri, 22 Mar 2019 13:24:41 +0000 (14:24 +0100)
src/be/nikiroo/fanfix/reader/BasicReader.java

index 008e4d5bd06c22d3851e1c2b9442a13eb41b2adf..668418922f216f98ec4a30d47c158fe75cbc8c42 100644 (file)
@@ -340,11 +340,9 @@ public abstract class BasicReader implements Reader {
                }
 
                if (proc != null && sync) {
-                       while (proc.isAlive()) {
-                               try {
-                                       Thread.sleep(100);
-                               } catch (InterruptedException e) {
-                               }
+                       try {
+                               proc.waitFor();
+                       } catch (InterruptedException e) {
                        }
                }
        }