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.
One invocation of
CFRunLoopRunInMode()
may firereport_callback()
multiple times. In such a case, the next call tofido_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 enteringfido_hid_read()
and fall back to executing the run loop if it was empty.Debugged with @elibon99 and @martelletto.
Resolves #763