Fix fprintd AlreadyInUse error by respecting done flag

VerifyStart was called unconditionally on retry/no-match statuses,
ignoring the done parameter from fprintd's VerifyStatus signal.
When done=False the verify session is still active, causing
AlreadyInUse errors. Now only restarts verification when done=True.
This commit is contained in:
2026-03-26 15:43:27 +01:00
parent c759919367
commit b8e060b850
3 changed files with 58 additions and 10 deletions
+5 -3
View File
@@ -143,13 +143,15 @@ class FingerprintListener:
return
if status in _RETRY_STATUSES:
# Retry silently — finger wasn't read properly
self._device_proxy.VerifyStart("(s)", "any")
# Retry — finger wasn't read properly
if done:
self._device_proxy.VerifyStart("(s)", "any")
return
if status == "verify-no-match":
if self._on_failure:
self._on_failure()
# Restart verification for another attempt
self._device_proxy.VerifyStart("(s)", "any")
if done:
self._device_proxy.VerifyStart("(s)", "any")
return