fix(adb): throw correct error from sync.pull

This commit is contained in:
Simon Chan 2023-08-30 19:24:59 +08:00
parent 22f0329136
commit 9718f83926
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
3 changed files with 31 additions and 5 deletions

View file

@ -30,6 +30,9 @@ export async function* adbSyncPullGenerator(
yield packet.data;
}
done = true;
} catch (e) {
done = true;
throw e;
} finally {
if (!done) {
// sync pull can't be cancelled, so we have to read all data