diff --git a/src/UiPath.CoreIpc/Config/IpcServer.cs b/src/UiPath.CoreIpc/Config/IpcServer.cs index 0fbc3d40..138d0ec3 100644 --- a/src/UiPath.CoreIpc/Config/IpcServer.cs +++ b/src/UiPath.CoreIpc/Config/IpcServer.cs @@ -9,7 +9,6 @@ public sealed class IpcServer : IpcBase, IAsyncDisposable private readonly object _lock = new(); private readonly TaskCompletionSource _listening = new(); - private readonly TaskCompletionSource _stopped = new(); private readonly CancellationTokenSource _ctsActiveConnections = new(); private bool _disposeStarted; @@ -70,7 +69,6 @@ public Task WaitForStart() Start(); return _accepter.StartedAccepting; } - public Task WaitForStop() => _stopped.Task; internal ILogger? CreateLogger(string category) => ServiceProvider.MaybeCreateLogger(category); @@ -82,7 +80,6 @@ private void OnNewConnection(Stream network) private void OnNewConnectionError(Exception ex) { Trace.TraceError($"Failed to accept new connection. Ex: {ex}"); - _stopped.TrySetException(ex); } internal RouterConfig CreateRouterConfig(IpcServer server) => RouterConfig.From( diff --git a/src/UiPath.Ipc.Tests/Program.cs b/src/UiPath.Ipc.Tests/Program.cs deleted file mode 100644 index feb7a67e..00000000 --- a/src/UiPath.Ipc.Tests/Program.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.Extensions.Logging; -using Newtonsoft.Json; -using System.Text; -using UiPath.Ipc; -using UiPath.Ipc.Tests; - -if (args is not [var base64]) -{ - Console.Error.WriteLine($"Usage: dotnet {Path.GetFileName(Assembly.GetEntryAssembly()!.Location)} "); - return 1; -} -var externalServerParams = JsonConvert.DeserializeObject(Encoding.UTF8.GetString(Convert.FromBase64String(base64))); -await using var asyncDisposable = externalServerParams.CreateListenerConfig(out var serverTransport); - -await using var serviceProvider = new ServiceCollection() - .AddLogging(builder => builder.AddConsole()) - .AddSingleton() - .BuildServiceProvider(); - -await using var ipcServer = new IpcServer() -{ - ServiceProvider = serviceProvider, - Scheduler = new ConcurrentExclusiveSchedulerPair().ExclusiveScheduler, - Endpoints = new() - { - { typeof(IComputingService) }, - }, - Transport = serverTransport, -}; -ipcServer.Start(); -await ipcServer.WaitForStop(); - -return 0; \ No newline at end of file diff --git a/src/UiPath.Ipc.Tests/UiPath.Ipc.Tests.csproj b/src/UiPath.Ipc.Tests/UiPath.Ipc.Tests.csproj index 6b62feb9..a2179e3d 100644 --- a/src/UiPath.Ipc.Tests/UiPath.Ipc.Tests.csproj +++ b/src/UiPath.Ipc.Tests/UiPath.Ipc.Tests.csproj @@ -1,7 +1,6 @@  - WinExe net6.0;net461 UiPath.Ipc.Tests $(NoWarn);1998