qzind / qz-print

Archive for legacy qz-print versions (1.8, 1.9). See https://github.com/qzind/tray for modern versions.
Other
141 stars 101 forks source link

Release Claimed USB Device on Socket Disconnect #158

Closed tresf closed 8 years ago

tresf commented 8 years ago

If a device is not released before navigating away from a page, the message Error: USB Device [v: ..., p:...] is already claimed appears.

The only way to get the device claimed again is to close and restart QZ Tray (the Reload option in QZ Tray doesn't fix it)

image

akberenz commented 8 years ago

If this message shows up then QZ has an object in place for that device. You could actually 'Release Device' and re-'Claim Device' if necessary, but if you see that message, the data buttons should already work without having to claim after page load.

tresf commented 8 years ago

You could actually 'Release Device' and re-'Claim Device' if necessary,

I tried this. It knows enough to say it's claimed, but not enough to let me release it. It should be released on websocket close. If there's something I'm doing wrong please let me know.

The only way to fix this is to restart the entire QZ Tray application. This should be very easy to reproduce. Let me know if you need some more information to reproduce.

FYI/- I only tested this on Windows 10. I didn't have a chance (yet) to attempt to reproduce behavior on Linux or Mac.

akberenz commented 8 years ago

Implemented via 1dccc5dc160136f35f555539ff19decb77488dc8