Skip to content

Commit ec6b328

Browse files
committed
Only run compiler check once on load
1 parent 41e021c commit ec6b328

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/CSharpExtension.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ public CSharpExtension(ExtensionManager manager) : base(manager)
101101
Cleanup.Add(oldCompiler);
102102
}
103103
}
104+
105+
PluginCompiler.CheckCompilerBinary();
104106
}
105107

106108
/// <summary>

src/CSharpPluginLoader.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ public CSharpPluginLoader(CSharpExtension extension)
3737
{
3838
Instance = this;
3939
CSharpPluginLoader.extension = extension;
40-
PluginCompiler.CheckCompilerBinary();
4140
compiler = new PluginCompiler();
4241
}
4342

src/PluginCompiler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ public static void CheckCompilerBinary()
4747
case PlatformID.Win32Windows:
4848
FileName = "Compiler.exe";
4949
binaryPath = Path.Combine(rootDirectory, FileName);
50-
UpdateCheck(); // TODO: Only check once on server startup
50+
UpdateCheck();
5151
break;
5252

5353
case PlatformID.Unix:
5454
case PlatformID.MacOSX:
5555
FileName = $"Compiler.{(IntPtr.Size != 8 ? "x86" : "x86_x64")}";
5656
binaryPath = Path.Combine(rootDirectory, FileName);
57-
UpdateCheck(); // TODO: Only check once on server startup
57+
UpdateCheck();
5858
try
5959
{
6060
if (Syscall.access(binaryPath, AccessModes.X_OK) == 0)

0 commit comments

Comments
 (0)