From 502af043df5eae0853dcb75c8592d3eda91c79cb Mon Sep 17 00:00:00 2001 From: Archi Date: Sat, 21 Oct 2023 22:42:11 +0200 Subject: [PATCH] Closes #3051 --- ArchiSteamFarm/NLog/Logging.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/ArchiSteamFarm/NLog/Logging.cs b/ArchiSteamFarm/NLog/Logging.cs index efc25a572..c3ec1171a 100644 --- a/ArchiSteamFarm/NLog/Logging.cs +++ b/ArchiSteamFarm/NLog/Logging.cs @@ -355,8 +355,16 @@ internal static class Logging { try { ConsoleKeyInfo keyInfo = Console.ReadKey(true); - if (keyInfo.Key != ConsoleKey.C) { - continue; + switch (keyInfo.Key) { + case 0: + // Linux terminal closing STDIN, we're done here + return; + case ConsoleKey.C: + // User hitting 'c', as expected + break; + default: + // Any other input, ignored + continue; } OnUserInputStart();