fix(adb): read socket too slow can cause data loss

This commit is contained in:
Simon Chan 2023-10-11 00:25:07 +08:00
parent dce44ae9ac
commit 1aa7a92d2c
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
7 changed files with 190 additions and 164 deletions

View file

@ -108,12 +108,7 @@ export class AdbDaemonSocketController
(controller) => {
this.#readableController = controller;
},
{
highWaterMark: options.highWaterMark ?? 16 * 1024,
size(chunk) {
return chunk.byteLength;
},
},
{ highWaterMark: 0 },
),
);