diff --git a/src/core/Fingerprint.cpp b/src/core/Fingerprint.cpp index 16173a3..384e0c4 100644 --- a/src/core/Fingerprint.cpp +++ b/src/core/Fingerprint.cpp @@ -181,9 +181,12 @@ void CFingerprint::handleVerifyStatus(const std::string& result, bool done) { void CFingerprint::claimDevice() { const auto currentUser = ""; // Empty string means use the caller's id. m_sDBUSState.device->callMethodAsync("Claim").onInterface(DEVICE).withArguments(currentUser).uponReplyInvoke([this](std::optional e) { - if (e) + if (e) { Debug::log(WARN, "fprint: could not claim device, {}", e->what()); - else { + m_sDBUSState.retries++; + if (m_sDBUSState.retries < 3) + claimDevice(); + } else { Debug::log(LOG, "fprint: claimed device"); startVerify(); }