Fix Chrome v124+ not closing on Windows. resolves #1161 (#1193)

This commit is contained in:
ilike2burnthing
2024-05-20 00:52:55 +01:00
committed by GitHub
parent c304da2964
commit 5a2c61601e
8 changed files with 15 additions and 15 deletions

View File

@@ -788,15 +788,6 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
logger.debug("gracefully closed browser")
except Exception as e: # noqa
pass
# Force kill Chrome process in Windows
# https://github.com/FlareSolverr/FlareSolverr/issues/772
if os.name == 'nt':
try:
subprocess.call(['taskkill', '/f', '/pid', str(self.browser_pid)],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL)
except Exception:
pass
if (
hasattr(self, "keep_user_data_dir")
and hasattr(self, "user_data_dir")