From e51bb075e7a6e426b968966d59aeca41107e1f57 Mon Sep 17 00:00:00 2001 From: codeboyzhou Date: Tue, 5 Jan 2021 02:56:57 +0800 Subject: [PATCH] fix: java main process will be suspended when browsers installation timed out (#180) --- .../src/main/java/com/microsoft/playwright/impl/DriverJar.java | 1 + 1 file changed, 1 insertion(+) diff --git a/driver-bundle/src/main/java/com/microsoft/playwright/impl/DriverJar.java b/driver-bundle/src/main/java/com/microsoft/playwright/impl/DriverJar.java index 50dcbc86..f93e3b77 100644 --- a/driver-bundle/src/main/java/com/microsoft/playwright/impl/DriverJar.java +++ b/driver-bundle/src/main/java/com/microsoft/playwright/impl/DriverJar.java @@ -45,6 +45,7 @@ public class DriverJar extends Driver { Process p = pb.start(); boolean result = p.waitFor(10, TimeUnit.MINUTES); if (!result) { + p.destroy(); throw new RuntimeException("Timed out waiting for browsers to install"); } }