mirror of
https://github.com/FlareSolverr/FlareSolverr.git
synced 2025-06-07 12:05:37 +00:00
Kill dead Chrome processes in Windows
This commit is contained in:
parent
8316350b98
commit
9b2c602a1f
@ -729,6 +729,15 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
|
||||
logger.debug("gracefully closed browser")
|
||||
except Exception as e: # noqa
|
||||
logger.debug(e, exc_info=True)
|
||||
# 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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user