From 94672f4cb5f9905e2ba1f2f73bd71899d2ba873e Mon Sep 17 00:00:00 2001 From: Zachary Kulis Date: Tue, 2 Apr 2024 22:51:21 -0400 Subject: [PATCH] Fix file descriptor leak in service on quit(). --- undetected_chromedriver/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/undetected_chromedriver/__init__.py b/undetected_chromedriver/__init__.py index c419100..0fadbce 100644 --- a/undetected_chromedriver/__init__.py +++ b/undetected_chromedriver/__init__.py @@ -763,7 +763,9 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver): def quit(self): try: + self.service.stop() self.service.process.kill() + self.command_executor.close() logger.debug("webdriver process ended") except (AttributeError, RuntimeError, OSError): pass