Index: build/android/pylib/android/logdog_logcat_monitor.py |
diff --git a/build/android/pylib/android/logdog_logcat_monitor.py b/build/android/pylib/android/logdog_logcat_monitor.py |
index a89b9f4ea5369218ce9fb38221012b671e6de710..5a51cdb7f86b63e69da273f95edace8e6ed272d2 100644 |
--- a/build/android/pylib/android/logdog_logcat_monitor.py |
+++ b/build/android/pylib/android/logdog_logcat_monitor.py |
@@ -59,10 +59,14 @@ class LogdogLogcatMonitor(logcat_monitor.LogcatMonitor): |
def record_to_stream(): |
if self._logdog_stream: |
for data in self._adb.Logcat(filter_specs=self._filter_specs, |
- logcat_format='threadtime'): |
+ logcat_format='threadtime', |
+ iter_timeout=0.08): |
+ if self._stop_recording_event.isSet(): |
+ return |
+ if data: |
+ self._logdog_stream.write(data + '\n') |
if self._stop_recording_event.isSet(): |
return |
- self._logdog_stream.write(data + '\n') |
self._stop_recording_event.clear() |
if not self._record_thread: |