Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osx: handle report_callback() firing multiple times #762

Merged
merged 2 commits into from
Jan 3, 2024
Merged

osx: handle report_callback() firing multiple times #762

merged 2 commits into from
Jan 3, 2024

Conversation

LDVG
Copy link
Contributor

@LDVG LDVG commented Dec 21, 2023

One invocation of CFRunLoopRunInMode() may fire report_callback()
multiple times. In such a case, the next call to fido_hid_read() may
block for the full duration of the timeout. We can handle this by
querying the (non-blocking) pipe for any readily available data on
entering fido_hid_read() and fall back to executing the run loop if it
was empty.

Debugged with @elibon99 and @martelletto.

Resolves #763

@martelletto
Copy link
Contributor

it might make sense to bump the copyright in hid_osx.c; otherwise LGTM

LDVG added 2 commits December 22, 2023 08:42
One invocation of CFRunLoopRunInMode() may fire report_callback()
multiple times. In such a case, the next call to fido_hid_read() may
block for the full duration of the timeout. We can handle this by
querying the (non-blocking) pipe for any readily available data on
entering fido_hid_read() and fall back to executing the run loop if it
was empty.

Debugged with @elibon99 and @martelletto.
@kongeo kongeo merged commit d7ecb2b into main Jan 3, 2024
71 checks passed
@kongeo kongeo deleted the osx-ci branch January 3, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Credential generation and assertion is blocking till timeout
3 participants