thegecko / webusb

Node.js implementation of the WebUSB Specification
https://thegecko.github.io/webusb/
MIT License
183 stars 27 forks source link

getDevices not spec-compliant #55

Closed dsanders11 closed 4 years ago

dsanders11 commented 5 years ago

May create a PR for this at some point, but in the mean time creating an issue.

The current implementation of getDevices doesn't follow the steps in the spec.

The main effect of this is that it will return all devices in allowedDevices, which is incorrect, as this will include devices not connected to the system. This means after disconnecting a device, getDevices will still list it, but open will throw an error.

thegecko commented 4 years ago

Now deleting disconnected devices from the cache