Skip to content

Commit cf291ac

Browse files
committed
whb04b: Interrupted is not an error
1 parent ee1c3ca commit cf291ac

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • src/hal/user_comps/xhc-whb04b-6

src/hal/user_comps/xhc-whb04b-6/usb.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,8 @@ void Usb::process()
746746
timeout.tv_usec = 200 * 1000;
747747

748748
int r = libusb_handle_events_timeout_completed(context, &timeout, nullptr);
749-
if(r != 0)
749+
//LIBUSB_ERROR_INTERRUPTED can happen on shutdown signal and is fine
750+
if(r != 0 && r != LIBUSB_ERROR_INTERRUPTED)
750751
{
751752
std::cerr << endl << "Error: process() libusb_handle_events_timeout_completed returned " << r << endl;
752753
}

0 commit comments

Comments
 (0)