mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-12 13:57: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,13 +120,11 @@ 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) {
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user