mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-25 22:17:51 +01:00
Merge branch 'master' into Cyberboss-patch-1
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
namespace TGServerService
|
||||
{
|
||||
partial class ProjectInstaller
|
||||
public partial class ProjectInstaller
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace TGServerService
|
||||
/// This tells the .msi there is a Windows <see cref="System.ServiceProcess.ServiceBase"/> in this <see cref="System.Reflection.Assembly"/> that needs installation
|
||||
/// </summary>
|
||||
[RunInstaller(true)]
|
||||
partial class ProjectInstaller : Installer
|
||||
public partial class ProjectInstaller : Installer
|
||||
{
|
||||
/// <summary>
|
||||
/// Construct a <see cref="ProjectInstaller"/>
|
||||
|
||||
@@ -344,14 +344,20 @@ namespace TGServerService
|
||||
{
|
||||
CurrentDDLog = String.Format("{0} {1} Diagnostics.txt", Now.ToLongDateString(), Now.ToLongTimeString()).Replace(':', '-');
|
||||
WriteCurrentDDLog("Starting monitoring...");
|
||||
pcpu = new PerformanceCounter("Process", "% Processor Time", Proc.ProcessName, true);
|
||||
}
|
||||
pcpu = new PerformanceCounter("Process", "% Processor Time", Proc.ProcessName, true);
|
||||
MemTrackTimer.Start();
|
||||
Proc.WaitForExit();
|
||||
lock (watchdogLock) //synchronize
|
||||
try
|
||||
{
|
||||
MemTrackTimer.Stop();
|
||||
pcpu.Dispose();
|
||||
Proc.WaitForExit();
|
||||
}
|
||||
finally
|
||||
{
|
||||
lock (watchdogLock) //synchronize
|
||||
{
|
||||
MemTrackTimer.Stop();
|
||||
pcpu.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
WriteCurrentDDLog("Crash detected!");
|
||||
|
||||
@@ -21,8 +21,7 @@ namespace TGServerService
|
||||
string serviceCommsKey; //regenerated every DD restart
|
||||
|
||||
//range of supported api versions
|
||||
readonly Version MinAPIVersion = new Version("3.1.0.0");
|
||||
readonly Version MaxAPIVersion = new Version("3.1.0.99");
|
||||
const int AllowedMajorAPIVersion = 1;
|
||||
Version GameAPIVersion;
|
||||
|
||||
//See code/modules/server_tools/server_tools.dm for command switch
|
||||
@@ -118,7 +117,7 @@ namespace TGServerService
|
||||
}
|
||||
catch
|
||||
{
|
||||
Service.WriteWarning(String.Format("API version of the game ({0}) is incompatible with the current supported API versions (Min: {1}. Max: {2}). Interop disabled.", splits.Count > 1 ? splits[1] : "NULL", MinAPIVersion, MaxAPIVersion), EventID.APIVersionMismatch);
|
||||
Service.WriteWarning(String.Format("API version of the game ({0}) is incompatible with the current supported API versions (3.{2}.x.x). Interop disabled.", splits.Count > 1 ? splits[1] : "NULL", AllowedMajorAPIVersion), EventID.APIVersionMismatch);
|
||||
GameAPIVersion = null;
|
||||
break;
|
||||
}
|
||||
@@ -154,7 +153,9 @@ namespace TGServerService
|
||||
//requires topiclock
|
||||
bool CheckAPIVersionConstraints()
|
||||
{
|
||||
return !(GameAPIVersion == null || GameAPIVersion < MinAPIVersion || GameAPIVersion > MaxAPIVersion);
|
||||
//major will never change for all of TGS3
|
||||
//we treat minor as major, build as minor, and revision as patch
|
||||
return !(GameAPIVersion == null || GameAPIVersion.Minor != AllowedMajorAPIVersion);
|
||||
}
|
||||
|
||||
//Fuckery to diddle byond with the right packet to accept our girth
|
||||
|
||||
Reference in New Issue
Block a user