Allow Drivers to handle key events after being restarted (#1150)

This commit is contained in:
Josh Karpel
2022-11-23 04:08:32 -06:00
committed by GitHub
parent 3aaa4d3ec1
commit 10a3fb1d1b
2 changed files with 2 additions and 0 deletions

View File

@@ -176,6 +176,7 @@ class LinuxDriver(Driver):
self.exit_event.set()
if self._key_thread is not None:
self._key_thread.join()
self.exit_event.clear()
termios.tcflush(self.fileno, termios.TCIFLUSH)
except Exception as error:
# TODO: log this

View File

@@ -84,6 +84,7 @@ class WindowsDriver(Driver):
if self._event_thread is not None:
self._event_thread.join()
self._event_thread = None
self.exit_event.clear()
except Exception as error:
# TODO: log this
pass