
If result < 0 here, libusb_submit_transfer returned an error, so we need to shut down. If !resubmit, then cancel_transfers() was already called by one of the stop or close functions, so streaming is already false.
If result < 0 here, libusb_submit_transfer returned an error, so we need to shut down. If !resubmit, then cancel_transfers() was already called by one of the stop or close functions, so streaming is already false.