fix boardd reconnect loop (#22081)

* fix boardd reconnect loop

* add that back
pull/22088/head
Adeeb Shihadeh 2021-08-30 21:25:48 -07:00 committed by GitHub
parent 784b3a2ac9
commit 0e3462e051
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -57,6 +57,7 @@ Panda::Panda(std::string serial) {
dev_handle = NULL;
}
}
if (dev_handle == NULL) goto fail;
libusb_free_device_list(dev_list, 1);
if (libusb_kernel_driver_active(dev_handle, 0) == 1) {
@ -110,7 +111,7 @@ std::vector<std::string> Panda::list() {
libusb_context *context = NULL;
libusb_device **dev_list = NULL;
std::vector<std::string> serials;
int err = init_usb_ctx(context);
if (err != 0) { return serials; }