From 4d5b8031709b412b24efe6e524bc89620fda191a Mon Sep 17 00:00:00 2001 From: Simon Chan <1330321+yume-chan@users.noreply.github.com> Date: Tue, 31 Dec 2024 16:36:52 +0800 Subject: [PATCH] fix(scrcpy): correct version in 2.1.1 --- libraries/adb/src/server/transport.ts | 1 + libraries/scrcpy/src/2_1_1.ts | 13 +++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/libraries/adb/src/server/transport.ts b/libraries/adb/src/server/transport.ts index 44ce1b511..61691c293 100644 --- a/libraries/adb/src/server/transport.ts +++ b/libraries/adb/src/server/transport.ts @@ -100,6 +100,7 @@ export class AdbServerTransport implements AdbTransport { for (const socket of this.#sockets) { await socket.close(); } + this.#sockets.length = 0; this.#closed.resolve(); } } diff --git a/libraries/scrcpy/src/2_1_1.ts b/libraries/scrcpy/src/2_1_1.ts index aa3924138..a9d753f24 100644 --- a/libraries/scrcpy/src/2_1_1.ts +++ b/libraries/scrcpy/src/2_1_1.ts @@ -1,4 +1,9 @@ -export { - ScrcpyOptions2_1 as ScrcpyOptions2_1_1, - ScrcpyOptions2_1Impl as ScrcpyOptions2_1_1Impl, -} from "./2_1/index.js"; +import { ScrcpyOptions2_1 } from "./2_1/index.js"; + +export class ScrcpyOptions2_1_1 extends ScrcpyOptions2_1 { + constructor(init: ScrcpyOptions2_1.Init, version = "2.1.1") { + super(init, version); + } +} + +export { ScrcpyOptions2_1Impl as ScrcpyOptions2_1_1Impl } from "./2_1/index.js";