Add more logging to reachable check
This commit is contained in:
@@ -46,19 +46,23 @@ public class GlobalInstanceOptionsValidator : AbstractValidator<GlobalInstanceOp
|
||||
try
|
||||
{
|
||||
using var response = await httpClient.GetAsync(url, cancellationToken);
|
||||
reachable = response.StatusCode == HttpStatusCode.OK;
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
reachable = true;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($"Reachable check got unexpected status code {response.StatusCode}.")
|
||||
}
|
||||
}
|
||||
catch
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Console.WriteLine(ex.Message);
|
||||
}
|
||||
|
||||
// Wait for 15 seconds for next try
|
||||
Console.WriteLine($"The URL \"{opts.Host}\" is not reachable. Next attempt in 15 seconds...");
|
||||
Console.WriteLine($"The URL \"{opts.Host}/api?apikey=[REDACTED]\" is not reachable. Next attempt in 15 seconds...");
|
||||
Thread.Sleep(15000);
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
},
|
||||
"IpLeakTest": {
|
||||
// Docker Environment Variables:
|
||||
// - IpLeakTest: false (set to true to enable)
|
||||
// - IpLeakTest__Enabled: false (set to true to enable)
|
||||
"Enabled": false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ services:
|
||||
- LIDARR__ENABLED=false
|
||||
- LIDARR__HOST=http://localhost:8686
|
||||
- LIDARR__APIKEY=APIKEY
|
||||
#- IpLeakTest=false # uncomment and set to true to enable IP leak test
|
||||
#- IpLeakTest_Enabled=false # uncomment and set to true to enable IP leak test
|
||||
### example for multiple instances of same type
|
||||
#- SONARR__0__NAME=NAME 1 (optional)
|
||||
#- SONARR__0__ENABLED=false
|
||||
|
||||
Reference in New Issue
Block a user