From 3eaf1037daadc33ae714515a9521a1ddccb29488 Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Thu, 23 Jan 2025 01:21:02 -0800 Subject: fix: bridge not closing on device disconnect --- server/Brokenithm-Evolved-iOS/Program.cs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'server/Brokenithm-Evolved-iOS') diff --git a/server/Brokenithm-Evolved-iOS/Program.cs b/server/Brokenithm-Evolved-iOS/Program.cs index f6785cb..931ad63 100644 --- a/server/Brokenithm-Evolved-iOS/Program.cs +++ b/server/Brokenithm-Evolved-iOS/Program.cs @@ -4,11 +4,9 @@ using System; using System.Collections.Generic; using System.Diagnostics; using System.IO.MemoryMappedFiles; -using System.Linq; using System.Security.Principal; using System.Text; using System.Threading; -using System.Threading.Tasks; namespace Brokenithm_Evolved_iOS { @@ -119,11 +117,16 @@ namespace Brokenithm_Evolved_iOS try { Process processToKill = process_map[udid]; - if (!processToKill.HasExited) + Console.WriteLine($"destroying brokenithm-evolved-umi server"); + Process.Start(new ProcessStartInfo { - processToKill.Kill(); - } - processToKill.Dispose(); + FileName = "taskkill", + Arguments = $"/IM brokenithm-evolved-umi.exe /F", + RedirectStandardOutput = true, + RedirectStandardError = true, + UseShellExecute = false, + CreateNoWindow = true + }).WaitForExit(); process_map.Remove(udid); } catch (Exception ex) -- cgit v1.2.3