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

This commit is contained in:
stevenh 2012-02-13 21:27:35 +00:00
parent e5a078957f
commit ce5c659e89

View file

@ -210,6 +210,9 @@ namespace TShockAPI
Commands.InitCommands(); Commands.InitCommands();
//RconHandler.StartThread(); //RconHandler.StartThread();
if (Config.RestApiEnabled)
RestApi.Start();
if (Config.BufferPackets) if (Config.BufferPackets)
PacketBuffer = new PacketBufferer(); PacketBuffer = new PacketBufferer();
@ -434,8 +437,6 @@ namespace TShockAPI
AuthToken = 0; AuthToken = 0;
} }
Regions.ReloadAllRegions(); Regions.ReloadAllRegions();
if (Config.RestApiEnabled)
RestApi.Start();
StatTracker.CheckIn(); StatTracker.CheckIn();
FixChestStacks(); FixChestStacks();