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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user