fix: Updates first load configuration (#680)

<img width="814" alt="Screen Shot 2021-08-08 at 11 33 24 PM" src="https://user-images.githubusercontent.com/3953314/128667907-be43bf24-df7b-481b-ab0a-8b9094f01188.png">
This commit is contained in:
Kamron Batman 2021-08-08 23:42:10 -07:00 committed by GitHub
parent b0f8fe0350
commit f795ab4698
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 91 additions and 51 deletions

View file

@ -384,7 +384,7 @@ namespace Server
if (Assembly == null)
{
throw new Exception("Core: Assembly entry is missing.");
throw new Exception("Assembly entry is missing.");
}
if (Thread != null)
@ -417,6 +417,17 @@ namespace Server
".TrimMultiline());
Utility.PopColor();
ProcessorCount = Environment.ProcessorCount;
if (ProcessorCount > 1)
{
MultiProcessor = true;
}
Console.CancelKeyPress += Console_CancelKeyPressed;
ServerConfiguration.Load();
logger.Information($"Running on {RuntimeInformation.FrameworkDescription}");
var s = Arguments;
@ -426,20 +437,11 @@ namespace Server
logger.Information($"Running with arguments: {s}");
}
ProcessorCount = Environment.ProcessorCount;
if (ProcessorCount > 1)
{
MultiProcessor = true;
}
if (MultiProcessor)
{
logger.Information($"Optimizing for {ProcessorCount} processor{(ProcessorCount == 1 ? "" : "s")}");
}
Console.CancelKeyPress += Console_CancelKeyPressed;
if (GCSettings.IsServerGC)
{
logger.Information("Server garbage collection mode enabled");
@ -447,8 +449,6 @@ namespace Server
logger.Information($"High resolution timing ({(Stopwatch.IsHighResolution ? "Supported" : "Unsupported")})");
ServerConfiguration.Load();
var assemblyPath = Path.Join(BaseDirectory, AssembliesConfiguration);
// Load UOContent.dll