Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ protected override void LogEventsFromTextOutput(string singleLine, MessageImport
}

protected override void ProcessStarted()
=> _connectionLoopTask = Task.Run(() =>
=> _connectionLoopTask = Task.Run(async () =>
{
try
{
Expand All @@ -249,7 +249,7 @@ protected override void ProcessStarted()
pipeServer.RegisterSerializer(new VoidResponseSerializer(), typeof(VoidResponse));
pipeServer.RegisterSerializer(new FailedTestInfoRequestSerializer(), typeof(FailedTestInfoRequest));
pipeServer.RegisterSerializer(new RunSummaryInfoRequestSerializer(), typeof(RunSummaryInfoRequest));
pipeServer.WaitConnectionAsync(_waitForConnections.Token).GetAwaiter().GetResult();
await pipeServer.WaitConnectionAsync(_waitForConnections.Token);
_connections.Add(pipeServer);
Log.LogMessage(MessageImportance.Low, $"Client connected to '{_pipeNameDescription.Name}'");
}
Expand All @@ -258,6 +258,10 @@ protected override void ProcessStarted()
{
// Do nothing we're cancelling
}
catch (Exception ex)
{
Log.LogError(ex.ToString());
}
});

public override bool Execute()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public NamedPipeServer(
CancellationToken cancellationToken)
{
ArgumentGuard.IsNotNull(pipeNameDescription);
_namedPipeServerStream = new((PipeName = pipeNameDescription).Name, PipeDirection.InOut, maxNumberOfServerInstances);
_namedPipeServerStream = new((PipeName = pipeNameDescription).Name, PipeDirection.InOut, maxNumberOfServerInstances, PipeTransmissionMode.Byte, PipeOptions.Asynchronous);
_callback = callback;
_environment = environment;
_logger = logger;
Expand Down