From ce5c659e89cfc3d53c8b13a5f48fdefe3b3f44ae Mon Sep 17 00:00:00 2001 From: stevenh Date: Mon, 13 Feb 2012 21:27:35 +0000 Subject: [PATCH] Moved RestApi initialisation to main Initialise method so its available early. This helps tools detect a server during its timeconsuming startup. Additional threading may be required to ensure timely responses during high load periods --- TShockAPI/TShock.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 2c50bf97..0c697c24 100755 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -210,6 +210,9 @@ namespace TShockAPI Commands.InitCommands(); //RconHandler.StartThread(); + if (Config.RestApiEnabled) + RestApi.Start(); + if (Config.BufferPackets) PacketBuffer = new PacketBufferer(); @@ -434,8 +437,6 @@ namespace TShockAPI AuthToken = 0; } Regions.ReloadAllRegions(); - if (Config.RestApiEnabled) - RestApi.Start(); StatTracker.CheckIn(); FixChestStacks();