cgoldberg / xvfbwrapper

Manage headless displays with Xvfb (X virtual framebuffer)
Other
295 stars 52 forks source link

Update the start() method to do polling instead of a fixed sleep. #30

Open cgoldberg opened 7 years ago

cgoldberg commented 7 years ago

this code is from the start() method in xvfbwrapper.py:

# give Xvfb time to start
time.sleep(self.__class__.SLEEP_TIME_BEFORE_START)
ret_code = self.proc.poll()

It uses a fixed time.sleep(.1) to wait for Xvfb startup. Change this so it calls proc.poll() in a loop with a timeout.