From b4aa0cc7bac43793471deba13da86391fb9beed2 Mon Sep 17 00:00:00 2001 From: peter_kim <109723821+boramPeter@users.noreply.github.com> Date: Wed, 2 Apr 2025 17:45:31 +0900 Subject: [PATCH] Call unblockDevice when terminating a session Occasionally, when a session is terminated, the device does not change to the "unblock" state. To address this, I have added a call to the unblock function when ending the session. Please review it, and if there are no issues, please merge it. Thank you. --- src/plugin.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/plugin.ts b/src/plugin.ts index e9dd8bcb4..08674579b 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -630,6 +630,15 @@ class DevicePlugin extends BasePlugin { log.warn(`Error while releasing connection for device ${device.udid}. Error: ${err}`); } } + // add unblockDevice call + if (device?.udid && device?.host) { + try { + await unblockDevice(device.udid, device.host); + log.info(`Device ${device.udid} unblocked successfully.`); + } catch (err) { + log.warn(`Failed to unblock device ${device.udid}. Error: ${err}`); + } + } return res; } }