This repository was archived by the owner on Apr 15, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,11 +28,13 @@ public class Server
2828
2929 public readonly string serverId ;
3030 public readonly string configLocation ;
31- public readonly uint ? port ;
31+ private readonly uint ? port ;
3232 public readonly string [ ] args ;
3333 public readonly string serverDir ;
3434 public readonly string logDir ;
3535
36+ public uint Port => port ?? ServerConfig . Port . Value ;
37+
3638 private DateTime initStopTimeoutTime ;
3739 private DateTime initRestartTimeoutTime ;
3840
@@ -129,7 +131,7 @@ private set
129131 // Update related variables
130132 LogDirFile = string . IsNullOrEmpty ( value ) || string . IsNullOrEmpty ( logDir )
131133 ? null
132- : $ "{ Path . Combine ( logDir , value ) } _{{0}}_output_log .txt";
134+ : $ "{ Path . Combine ( logDir , value ) } _{{0}}_log_ { Port } .txt";
133135
134136 lock ( this )
135137 {
@@ -309,7 +311,7 @@ public void StartServer(bool restartOnCrash = true)
309311 "-nodedicateddelete" ,
310312 $ "-id{ Process . GetCurrentProcess ( ) . Id } ",
311313 $ "-console{ consoleSocket . Port } ",
312- $ "-port{ port ?? ServerConfig . Port . Value } "
314+ $ "-port{ Port } "
313315 } ;
314316
315317 if ( string . IsNullOrEmpty ( ScpLogFile ) || ServerConfig . NoLog . Value )
You can’t perform that action at this time.
0 commit comments