diff --git a/Server/Program.cs b/Server/Program.cs index b2daf16..6d08d3d 100644 --- a/Server/Program.cs +++ b/Server/Program.cs @@ -75,11 +75,11 @@ private void Clean() Console.WriteLine($"Unload success: {!contextref?.IsAlive}"); } } - private IServer CreateServer(string name, List interfaces, KeyPair ecdh, WriteLogAsync? writelogasync) + private IServer CreateServer(string name, List interfaces, KeyPair ecdh, WriteLogAsync? writelogasync, string? logfile) { if (Server_class != null) { - var srv = Activator.CreateInstance(Server_class, name, interfaces, ecdh, writelogasync); + var srv = Activator.CreateInstance(Server_class, name, interfaces, ecdh, writelogasync, logfile); if (srv != null) { return (IServer)srv; @@ -144,7 +144,7 @@ private async Task StartServer(int attempt = 0) { try { - server = CreateServer(Config.Server.Name, Config.Server.Interfaces, ecdh, writelogasync); + server = CreateServer(Config.Server.Name, Config.Server.Interfaces, ecdh, writelogasync, Config.Logfile); } catch (Exception ex) { @@ -244,6 +244,10 @@ static async Task Main() program.Load("Server_base.dll"); program.StartRemote(); await program.StartServer(); + while (true) + { + Console.ReadLine(); + } } } } \ No newline at end of file