mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 18:11:27 -07:00
fix connectivity check cancellation
This commit is contained in:
parent
9edd5fe2da
commit
d74511b334
@ -86,7 +86,7 @@
|
||||
|
||||
if (finishedTask.IsFaulted)
|
||||
exceptions.Add(finishedTask.Exception!.InnerException!);
|
||||
else
|
||||
else if (!finishedTask.IsCanceled)
|
||||
BaseUrl = finishedTask.Result;
|
||||
}
|
||||
|
||||
@ -94,7 +94,11 @@
|
||||
tokenSource.Cancel();
|
||||
|
||||
if (string.IsNullOrEmpty(BaseUrl))
|
||||
{
|
||||
if (exceptions.Any())
|
||||
return exceptions[0];
|
||||
return new TaskCanceledException("All tasks have been cancelled"); // we can't add TaskCanceledExceptions to the list
|
||||
}
|
||||
|
||||
App.Logger.WriteLine(LOG_IDENT, $"Got {BaseUrl} as the optimal base URL");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user