GoogleChromeLabs / chromeos_smart_card_connector

Smart Card Connector App for Chrome OS
https://chrome.google.com/webstore/detail/smart-card-connector/khpfeaanjngmcnplbdlpegiifgpfgdco
Apache License 2.0
134 stars 49 forks source link

[libusb] Avoid duplicate USB transfers #1107

Closed emaxx-google closed 8 months ago

emaxx-google commented 11 months ago

Don't make new chrome.usb/WebUSB API calls in case there're already running equivalent ones (for input transfers).

Besides consuming Chrome resources, these extra calls were reportedly leading to hitting the OS kernel limits on the number of active transfers, which completely broke the USB communication in some cases.

This fixes #1104.

emaxx-google commented 11 months ago

The patch is pretty nontrivial and I didn't manage to split it up further, so sorry for that. Also still working on a unit test...

github-actions[bot] commented 11 months ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.23% lines.

github-actions[bot] commented 8 months ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.28% lines.

github-actions[bot] commented 8 months ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.28% lines.