Skip to content

Commit

Permalink
PR #8206 from Nir: Fix FW update exception showed after entering upda…
Browse files Browse the repository at this point in the history
…te state
  • Loading branch information
maloel committed Jan 21, 2021
2 parents ea575ed + de93cf6 commit eb66c68
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions common/fw-update-helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ namespace rs2
{
log("Requesting to switch to recovery mode");
upd.enter_update_state();
// Allow time for the device to disconnect before calling "query_devices"
std::this_thread::sleep_for(std::chrono::seconds(2));

if (!check_for([this, serial, &dfu]() {
auto devs = _ctx.query_devices();
Expand All @@ -255,9 +257,10 @@ namespace rs2
}
}
catch (std::exception &e) {
std::stringstream s;
s << "Exception caught in FW Update process-flow: " << e.what();
log(s.str().c_str());
_viewer.not_model->output.add_log( RS2_LOG_SEVERITY_WARN,
__FILE__,
__LINE__,
to_string() << "Exception caught in FW Update process-flow: " << e.what() << "; Retrying..." );
}
catch (...) {}
}
Expand Down

0 comments on commit eb66c68

Please sign in to comment.