summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar pod2g2010-12-28 23:20:29 +0100
committerGravatar pod2g2010-12-28 23:20:29 +0100
commit72e1427dde744addb0e5aeca364ec43ddf954895 (patch)
treea28dde07d0672dc55163549b5e60cf83db3b4278
parent6a561c6230e4132cdc99669fafda6eee59e87bc3 (diff)
downloadlibirecovery-72e1427dde744addb0e5aeca364ec43ddf954895.tar.gz
libirecovery-72e1427dde744addb0e5aeca364ec43ddf954895.tar.bz2
OPTIM: faster console reading
-rw-r--r--libirecovery.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libirecovery.c b/libirecovery.c
index c9e5949..58ef080 100644
--- a/libirecovery.c
+++ b/libirecovery.c
@@ -762,10 +762,11 @@ irecv_error_t irecv_receive(irecv_client_t client) {
return IRECV_E_SUCCESS;
}
}
+ if (bytes < BUFFER_SIZE) break;
} else break;
}
- // pod2g 2010-12-28: MacOSX need a reset if read times out
+ // pod2g 2010-12-28: MacOSX need a reset if read times out, also the reset seems to improve stability when switching interfaces
irecv_reset(client);
irecv_set_interface(client, 1, 1);
return IRECV_E_SUCCESS;