-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Hello, ever since using python 3.11 with UC v3.2.1, I have an issue where socket doesn't close after chrome is quitted. so I created a test enviroment
Running with proxy --> 185.151.247.141
while True:
options = uc.ChromeOptions()
options.add_argument('--no-first-run --password-store=basic')
options.add_experimental_option("debuggerAddress", "127.0.0.1:2222")
options.add_argument(f"--user-data-dir={self.data['profile_path']}")
executable_path = f'C:\\Users\\Administrator\\Desktop\\Project\\drivers\\chromedriver (2)'
options.add_argument('--disable-backgrounding-occluded-windows')
self.driver = uc.Chrome (options=options, driver_executable_path=executable_path, enable_cdp_events=True)
self.driver.get("google.com")
self.driver.quit()
time.sleep(30)
after .quit is called, during sleeping time there should be no TCP connection alive
netstat -ano | find "185.151.247.141"
TCP 192.168.1.31:50385 185.151.247.141:14432 ESTABLISHED 19652
TCP 192.168.1.31:50386 185.151.247.141:14432 ESTABLISHED 19652
and sometimes it'd be CLOSE_WAIT.
Any reason why?
I think a socket is made in cdp method that has not closed, which caused this, but I couldn't find it.
After few hours of running, all ports get occupied by program, and then it allows no TCP connection which will break everything.
Metadata
Metadata
Assignees
Labels
No labels