wait up to 5 seconds for the headless firefox to die(sounds creepy when I say it like that)
Former-commit-id: 4d605d40b2
Former-commit-id: 34825884aadce5ea3394fadf97807c5c35f9be13
This commit is contained in:
@ -444,6 +444,7 @@ public class I2PFirefox extends I2PCommonBrowser {
|
|||||||
println("Headless browser run completed, exit: " + hev);
|
println("Headless browser run completed, exit: " + hev);
|
||||||
if (!hev)
|
if (!hev)
|
||||||
hp.destroy();
|
hp.destroy();
|
||||||
|
hev = hp.waitFor(5, TimeUnit.SECONDS);
|
||||||
if (hp.isAlive()) {
|
if (hp.isAlive()) {
|
||||||
int forcedExitCode = hp.destroyForcibly().waitFor();
|
int forcedExitCode = hp.destroyForcibly().waitFor();
|
||||||
println("Headless browser run forcibly terminated, exit: " +
|
println("Headless browser run forcibly terminated, exit: " +
|
||||||
|
Reference in New Issue
Block a user