From 48fe891ac25883ea30b1d355296a37e61417b247 Mon Sep 17 00:00:00 2001 From: chrys Date: Mon, 4 Jun 2018 19:52:13 +0200 Subject: [PATCH] decrease timeout --- src/fenrirscreenreader/screenDriver/ptyDriver.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fenrirscreenreader/screenDriver/ptyDriver.py b/src/fenrirscreenreader/screenDriver/ptyDriver.py index 99ba3a0a..9e700acf 100644 --- a/src/fenrirscreenreader/screenDriver/ptyDriver.py +++ b/src/fenrirscreenreader/screenDriver/ptyDriver.py @@ -102,7 +102,6 @@ class driver(screenDriver): fdList += [fd] if interruptFd: fdList += [interruptFd] - starttime = time.time() while True: # respect timeout but wait a little bit of time to see if something more is here if (time.time() - starttime) >= timeout: @@ -182,7 +181,7 @@ class driver(screenDriver): # output if self.p_out in r: try: - msgBytes = self.readAll(self.p_out.fileno(), timeout=0.1, interruptFd=sys.stdin) + msgBytes = self.readAll(self.p_out.fileno(), timeout=0.001, interruptFd=sys.stdin) except (EOFError, OSError): active.value = False break