refactor: code cleanup

This commit is contained in:
Simon Chan 2024-06-02 01:55:26 +08:00
parent c440e83828
commit 721b6c0da6
No known key found for this signature in database
GPG key ID: A8B69F750B9BCEDD
68 changed files with 1161 additions and 1036 deletions

View file

@ -110,7 +110,7 @@ export class AdbDaemonSocketController
}
async #writeChunk(data: Uint8Array, signal: AbortSignal) {
const length = data.byteLength;
const length = data.length;
while (this.#availableWriteBytes < length) {
// Only one lock is required because Web Streams API guarantees
// that `write` is not reentrant.