Added more logging to IPCMediator.cs

This commit is contained in:
Harrison Deng 2021-04-09 00:38:47 -05:00
parent a9ff809ba8
commit 56e12ec22a

View File

@ -104,10 +104,11 @@ namespace GameServiceWarden.Core.UI
private async Task AcceptConnections() private async Task AcceptConnections()
{ {
List<Task> connectionTasks = new List<Task>(); List<Task> connectionTasks = new List<Task>();
Logger.Log("Accepting pipe connections."); Logger.Log("Accepting Interface connections.");
while (active) while (active)
{ {
NamedPipeServerStream pipe = new NamedPipeServerStream(name, PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Byte, PipeOptions.Asynchronous); NamedPipeServerStream pipe = new NamedPipeServerStream(name, PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Byte, PipeOptions.Asynchronous);
Logger.Log("Waiting for connection.", LogLevel.DEBUG);
await pipe.WaitForConnectionAsync(stopAcceptingToken.Token); await pipe.WaitForConnectionAsync(stopAcceptingToken.Token);
connectionTasks.Add(OnConnection(pipe)); connectionTasks.Add(OnConnection(pipe));
for (int i = 0; i < connectionTasks.Count; i++) for (int i = 0; i < connectionTasks.Count; i++)
@ -119,6 +120,7 @@ namespace GameServiceWarden.Core.UI
} }
} }
} }
Logger.Log("Waiting for connection tasks.", LogLevel.DEBUG);
foreach (Task task in connectionTasks) foreach (Task task in connectionTasks)
{ {
task.Wait(); task.Wait();