diff --git a/android_env/components/task_manager.py b/android_env/components/task_manager.py index 8171854..9bdbb56 100644 --- a/android_env/components/task_manager.py +++ b/android_env/components/task_manager.py @@ -241,7 +241,10 @@ def _start_dumpsys_thread(self, def _stop_logcat_thread(self): if self._logcat_thread is not None: - self._logcat_thread.kill() + try: + self._logcat_thread.kill() + except Exception as e: # pylint: disable=broad-except + logging.warning('Failed to kill logcat thread: %r', e) self._logcat_thread = None def _increment_bad_state(self) -> None: