From ed2c2a51d0341d91097f9ab2abb6cfe9ec632fb6 Mon Sep 17 00:00:00 2001 From: Ricardo Lopes Date: Wed, 5 Aug 2020 23:37:12 +0200 Subject: [PATCH] Cleanup --- OWML.Logging/ModSocketOutput.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/OWML.Logging/ModSocketOutput.cs b/OWML.Logging/ModSocketOutput.cs index aa0602f14..d01c6744c 100644 --- a/OWML.Logging/ModSocketOutput.cs +++ b/OWML.Logging/ModSocketOutput.cs @@ -47,11 +47,16 @@ private void WriteLine(MessageType type, string line, string senderType) if (message.Type == MessageType.Fatal) { - _socket.Close(); - Process.GetCurrentProcess().Kill(); + KillProcess(); } } + private void KillProcess() + { + _socket.Close(); + Process.GetCurrentProcess().Kill(); + } + private string GetCallingType(StackTrace frame) { try