Throw an aggregate exception if both alpha and bravo servers fail to start

This commit is contained in:
Cyberboss
2018-07-13 11:49:03 -04:00
parent 5a9a9cb422
commit f9f142bfb8
@@ -404,7 +404,7 @@ namespace Tgstation.Server.Host.Components.Watchdog
bravoServer = await bravoServerTask.ConfigureAwait(false);
alphaServer = await alphaServerTask.ConfigureAwait(false);
}
catch
catch (Exception e)
{
if (alphaServerTask != null)
if (alphaServerTask.Status == TaskStatus.RanToCompletion)
@@ -416,7 +416,10 @@ namespace Tgstation.Server.Host.Components.Watchdog
{
alphaServer = await alphaServerTask.ConfigureAwait(false);
}
catch { }
catch (Exception e2)
{
throw new AggregateException(e, e2);
}
}
throw;
}