Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions MultiAdmin/Server.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ public class Server

public readonly string serverId;
public readonly string configLocation;
public readonly uint? port;
private readonly uint? port;
public readonly string[] args;
public readonly string serverDir;
public readonly string logDir;

public uint Port => port ?? ServerConfig.Port.Value;

private DateTime initStopTimeoutTime;
private DateTime initRestartTimeoutTime;

Expand Down Expand Up @@ -129,7 +131,7 @@ private set
// Update related variables
LogDirFile = string.IsNullOrEmpty(value) || string.IsNullOrEmpty(logDir)
? null
: $"{Path.Combine(logDir, value)}_{{0}}_output_log.txt";
: $"{Path.Combine(logDir, value)}_{{0}}_log_{Port}.txt";

lock (this)
{
Expand Down Expand Up @@ -309,7 +311,7 @@ public void StartServer(bool restartOnCrash = true)
"-nodedicateddelete",
$"-id{Process.GetCurrentProcess().Id}",
$"-console{consoleSocket.Port}",
$"-port{port ?? ServerConfig.Port.Value}"
$"-port{Port}"
};

if (string.IsNullOrEmpty(ScpLogFile) || ServerConfig.NoLog.Value)
Expand Down