Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 9b54fde9 authored by Simon Chan's avatar Simon Chan
Browse files

fix(adb): fix AdbServerClient.waitFor returning immediately

parent fc9af953
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -457,9 +457,12 @@ export class AdbServerClient {
            `wait-for-${type}-${state}`,
        );

        // `connect` resolves when server writes `OKAY`,
        // but for this command the server writes `OKAY` after the condition is met.
        await this.connect(service, options);
        const socket = await this.connect(service, options);
        const readable = new BufferedReadableStream(socket.readable);
        await AdbServerClient.readOkay(readable);

        await readable.cancel();
        await socket.close();
    }

    async createTransport(