1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2025-01-04 06:38:28 +02:00

Fix error in epic fail handler if console input redirected

Eliminates an unhandled InvalidOperationException and loop causing thousands of sentry errors
This commit is contained in:
Qstick 2023-07-04 12:58:25 -05:00 committed by GitHub
parent 5638f9c0a1
commit 96b7aa6585
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,7 +117,7 @@ private static void Exit(ExitCodes exitCode, StartupContext startupArgs)
{
System.Threading.Thread.Sleep(1000);
if (System.Console.KeyAvailable)
if (!System.Console.IsInputRedirected && System.Console.KeyAvailable)
{
break;
}