mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-18 16:29:41 +02:00
Trap Kestrel Address bind exception to avoid bootloop
This commit is contained in:
parent
2c6b13dd11
commit
6ad3653c04
@ -1,5 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using System.IO;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
|
using Microsoft.AspNetCore.Connections;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Common.EnvironmentInfo;
|
using NzbDrone.Common.EnvironmentInfo;
|
||||||
using NzbDrone.Common.Exceptions;
|
using NzbDrone.Common.Exceptions;
|
||||||
@ -49,9 +51,23 @@ public static void Main(string[] args)
|
|||||||
{
|
{
|
||||||
System.Console.WriteLine("");
|
System.Console.WriteLine("");
|
||||||
System.Console.WriteLine("");
|
System.Console.WriteLine("");
|
||||||
Logger.Fatal(ex.Message + ". This can happen if another instance of Radarr is already running another application is using the same port (default: 7878) or the user has insufficient permissions");
|
Logger.Fatal(ex.Message + " This can happen if another instance of Radarr is already running another application is using the same port (default: 7878) or the user has insufficient permissions");
|
||||||
Exit(ExitCodes.RecoverableFailure);
|
Exit(ExitCodes.RecoverableFailure);
|
||||||
}
|
}
|
||||||
|
catch (IOException ex)
|
||||||
|
{
|
||||||
|
if (ex.InnerException is AddressInUseException)
|
||||||
|
{
|
||||||
|
System.Console.WriteLine("");
|
||||||
|
System.Console.WriteLine("");
|
||||||
|
Logger.Fatal(ex.Message + " This can happen if another instance of Radarr is already running another application is using the same port (default: 7878) or the user has insufficient permissions");
|
||||||
|
Exit(ExitCodes.RecoverableFailure);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
catch (RemoteAccessException ex)
|
catch (RemoteAccessException ex)
|
||||||
{
|
{
|
||||||
System.Console.WriteLine("");
|
System.Console.WriteLine("");
|
||||||
|
Loading…
Reference in New Issue
Block a user