From 3b5d3220652f48b25dfee85a26cf5ffd79fad4a8 Mon Sep 17 00:00:00 2001 From: Meivyn <793322+Meivyn@users.noreply.github.com> Date: Sat, 26 Nov 2022 02:32:51 -0500 Subject: [PATCH] Move disposal logic out of the catch block --- IPA.Loader/Logging/StdoutInterceptorPipes.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/IPA.Loader/Logging/StdoutInterceptorPipes.cs b/IPA.Loader/Logging/StdoutInterceptorPipes.cs index 3fc88c44..4409c5dd 100644 --- a/IPA.Loader/Logging/StdoutInterceptorPipes.cs +++ b/IPA.Loader/Logging/StdoutInterceptorPipes.cs @@ -56,9 +56,10 @@ namespace IPA.Logging catch (Exception ex) { Console.WriteLine(ex); - pipeServer.Close(); - manualResetEvent.Dispose(); } + + pipeServer.Close(); + manualResetEvent.Dispose(); }); } @@ -82,9 +83,10 @@ namespace IPA.Logging catch (Exception ex) { Console.WriteLine(ex); - pipeClient.Close(); - manualResetEvent.Dispose(); } + + pipeClient.Close(); + manualResetEvent.Dispose(); }); }