From f4179e4f0aee36f9b1ba896fca369dfdc1d640cf Mon Sep 17 00:00:00 2001 From: Mogzol Date: Fri, 11 Mar 2016 18:30:51 -0800 Subject: [PATCH] Possibly fix 'wit exited with -1' error --- BrawlBuilder/BrawlBuilder.WorkerCode.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/BrawlBuilder/BrawlBuilder.WorkerCode.cs b/BrawlBuilder/BrawlBuilder.WorkerCode.cs index cb59f12..28ef0f6 100644 --- a/BrawlBuilder/BrawlBuilder.WorkerCode.cs +++ b/BrawlBuilder/BrawlBuilder.WorkerCode.cs @@ -769,14 +769,9 @@ namespace BrawlBuilder if (curStatus == null) { - // This should only happen if p is killed, but just in case - if (!p.HasExited) - { - p.Kill(); - p.WaitForExit(); - } - - break; + // Wit has probably exited, but we'll try to loop through again after a short sleep. + Thread.Sleep(100); + continue; } Match m = r.Match(curStatus);