Skip to content

Commit 71a4590

Browse files
committed
Fix a Windows issue with UC Mode
1 parent 5f68c82 commit 71a4590

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

seleniumbase/undetected/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,10 @@ def quit(self):
439439
try:
440440
logger.debug("Terminating the UC browser")
441441
os.kill(self.browser_pid, 15)
442-
# Not sure if this is really needed:
443-
os.waitpid(self.browser_pid, 0)
442+
if IS_POSIX:
443+
os.waitpid(self.browser_pid, 0)
444+
else:
445+
time.sleep(0.05)
444446
except (AttributeError, ChildProcessError, RuntimeError, OSError):
445447
pass
446448
except TimeoutError as e:

0 commit comments

Comments
 (0)