close usb handle after faile (#1352)

pull/1360/head
Dean Lee 5 years ago committed by GitHub
parent 2fc3247343
commit dd05d1df83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      selfdrive/boardd/boardd.cc

@ -161,6 +161,11 @@ bool usb_connect() {
ignition_last = false;
if (dev_handle != NULL){
libusb_close(dev_handle);
dev_handle = NULL;
}
dev_handle = libusb_open_device_with_vid_pid(ctx, 0xbbaa, 0xddcc);
if (dev_handle == NULL) { goto fail; }

Loading…
Cancel
Save