I think I actually fixed it
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.ServiceProcess;
|
||||
@@ -21,12 +22,20 @@ namespace Torch.Server
|
||||
[STAThread]
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
|
||||
|
||||
Target.Register<FlowDocumentTarget>("FlowDocument");
|
||||
//Ensures that all the files are downloaded in the Torch directory.
|
||||
var workingDir = new FileInfo(typeof(Program).Assembly.Location).Directory.ToString();
|
||||
var binDir = Path.Combine(workingDir, "DedicatedServer64");
|
||||
Directory.SetCurrentDirectory(workingDir);
|
||||
|
||||
//HACK for block skins update
|
||||
foreach (var f in Directory.EnumerateFiles(workingDir, "System.*", SearchOption.TopDirectoryOnly))
|
||||
{
|
||||
File.Delete(f);
|
||||
}
|
||||
|
||||
if (!TorchLauncher.IsTorchWrapped())
|
||||
{
|
||||
TorchLauncher.Launch(Assembly.GetEntryAssembly().FullName, args, binDir);
|
||||
|
@@ -87,6 +87,9 @@
|
||||
<HintPath>..\packages\Microsoft.Win32.Registry.4.4.0\lib\net461\Microsoft.Win32.Registry.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="mscorlib" />
|
||||
<Reference Include="netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51">
|
||||
<HintPath>..\GameBinaries\netstandard.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
|
@@ -123,11 +123,13 @@ namespace Torch.Server
|
||||
_hasRun = true;
|
||||
Log.Info("Starting server.");
|
||||
MySandboxGame.ConfigDedicated = DedicatedInstance.DedicatedConfig.Model;
|
||||
if (MySandboxGame.ConfigDedicated.RemoteApiEnabled && !string.IsNullOrEmpty(MySandboxGame.ConfigDedicated.RemoteSecurityKey))
|
||||
{
|
||||
var myRemoteServer = new MyRemoteServer(MySandboxGame.ConfigDedicated.RemoteApiPort, MySandboxGame.ConfigDedicated.RemoteSecurityKey);
|
||||
Log.Info($"Remote API started on port {myRemoteServer.Port}");
|
||||
}
|
||||
//Are you serious, Keen? This is going away until it stops hanging.
|
||||
//if (MySandboxGame.ConfigDedicated.RemoteApiEnabled && !string.IsNullOrEmpty(MySandboxGame.ConfigDedicated.RemoteSecurityKey))
|
||||
//{
|
||||
// var myRemoteServer = new MyRemoteServer(MySandboxGame.ConfigDedicated.RemoteApiPort, MySandboxGame.ConfigDedicated.RemoteSecurityKey);
|
||||
// Log.Info($"Remote API started on port {myRemoteServer.Port}");
|
||||
//}
|
||||
Log.Warn("Remote API is disabled because it hangs the server start process. Blame Keen.");
|
||||
|
||||
_uptime = Stopwatch.StartNew();
|
||||
base.Start();
|
||||
|
Reference in New Issue
Block a user