Skip to content

Commit

Permalink
Bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Borna authored and Borna committed May 8, 2024
1 parent 9346d4f commit 74f76bf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ private void Clean()
Console.WriteLine($"Unload success: {!contextref?.IsAlive}");
}
}
private IServer CreateServer(string name, List<Interface> interfaces, KeyPair ecdh, WriteLogAsync? writelogasync)
private IServer CreateServer(string name, List<Interface> 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;
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -244,6 +244,10 @@ static async Task Main()
program.Load("Server_base.dll");
program.StartRemote();
await program.StartServer();
while (true)
{
Console.ReadLine();
}
}
}
}

0 comments on commit 74f76bf

Please sign in to comment.