mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-13 14:27:46 +01:00
Correct aapt/aapt2 waiting too long on execution output (#3071)
Co-authored-by: Connor Tumbleson <iBotPeaches@users.noreply.github.com>
This commit is contained in:
parent
80dcdd1d34
commit
b83b58e8e8
@ -120,12 +120,10 @@ public class OS {
|
|||||||
StreamCollector collector = new StreamCollector(process.getInputStream());
|
StreamCollector collector = new StreamCollector(process.getInputStream());
|
||||||
executor.execute(collector);
|
executor.execute(collector);
|
||||||
|
|
||||||
process.waitFor();
|
process.waitFor(15, TimeUnit.SECONDS);
|
||||||
if (! executor.awaitTermination(15, TimeUnit.SECONDS)) {
|
executor.shutdownNow();
|
||||||
executor.shutdownNow();
|
if (! executor.awaitTermination(5, TimeUnit.SECONDS)) {
|
||||||
if (! executor.awaitTermination(5, TimeUnit.SECONDS)) {
|
System.err.println("Stream collector did not terminate.");
|
||||||
System.err.println("Stream collector did not terminate.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return collector.get();
|
return collector.get();
|
||||||
} catch (IOException | InterruptedException e) {
|
} catch (IOException | InterruptedException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user