diff --git a/usb/usb.go b/usb/usb.go index 6e6e813..88843be 100644 --- a/usb/usb.go +++ b/usb/usb.go @@ -92,7 +92,7 @@ func (c *Context) OpenDeviceWithVidPid(vid, pid int) (*Device, error) { } func (c *Context) Close() error { - close(c.done) + c.done <- struct{}{} if c.ctx != nil { libusb.exit(c.ctx) }