Stop capture on error.

This commit is contained in:
Jared Boone
2016-05-12 22:03:25 -07:00
parent 8de12ff570
commit 537296b8c3

View File

@@ -268,6 +268,7 @@ void RecordView::on_tick_second() {
if( is_active() ) { if( is_active() ) {
const auto error = capture_thread->error(); const auto error = capture_thread->error();
if( error.is_valid() ) { if( error.is_valid() ) {
stop();
report_error(error.value()); report_error(error.value());
} }
const auto dropped_percent = std::min(99U, capture_thread->state().dropped_percent()); const auto dropped_percent = std::min(99U, capture_thread->state().dropped_percent());