mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-04 10:02:55 +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());
|
||||
executor.execute(collector);
|
||||
|
||||
process.waitFor();
|
||||
if (! executor.awaitTermination(15, TimeUnit.SECONDS)) {
|
||||
executor.shutdownNow();
|
||||
if (! executor.awaitTermination(5, TimeUnit.SECONDS)) {
|
||||
System.err.println("Stream collector did not terminate.");
|
||||
}
|
||||
process.waitFor(15, TimeUnit.SECONDS);
|
||||
executor.shutdownNow();
|
||||
if (! executor.awaitTermination(5, TimeUnit.SECONDS)) {
|
||||
System.err.println("Stream collector did not terminate.");
|
||||
}
|
||||
return collector.get();
|
||||
} catch (IOException | InterruptedException e) {
|
||||
|
Loading…
Reference in New Issue
Block a user