fastboot: remove retries on invalid IO iterator in OSX
When IOServiceGetMatchingServices returns an invalid iterator, IOIteratorReset doesn't help. Break the loop to prevent being stuck in the reset loop forever. This should be fine as the open_device() call in the upper layer is already doing retries. Bug: 286495045 Test: fastboot update Change-Id: Ia58fa9285640be34aa22cd77e4f58cc9092679a4
This commit is contained in:
parent
46477f1d82
commit
d1d5f5ab69
1 changed files with 1 additions and 6 deletions
|
@ -436,12 +436,7 @@ static int init_usb(ifc_match_func callback, std::unique_ptr<usb_handle>* handle
|
|||
|
||||
for (;;) {
|
||||
if (! IOIteratorIsValid(iterator)) {
|
||||
/*
|
||||
* Apple documentation advises resetting the iterator if
|
||||
* it should become invalid during iteration.
|
||||
*/
|
||||
IOIteratorReset(iterator);
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
|
||||
io_service_t device = IOIteratorNext(iterator);
|
||||
|
|
Loading…
Reference in a new issue