From cd8b62d0b62549c692cc46e1d7f27b654e9a3953 Mon Sep 17 00:00:00 2001 From: Kerry Jiang Date: Sat, 23 Mar 2024 17:58:16 -0700 Subject: [PATCH] fixed another build error in benchmarks --- test/SuperSocket.Benchmarks/CurrentSend.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/SuperSocket.Benchmarks/CurrentSend.cs b/test/SuperSocket.Benchmarks/CurrentSend.cs index 883825b8a..19dff636a 100644 --- a/test/SuperSocket.Benchmarks/CurrentSend.cs +++ b/test/SuperSocket.Benchmarks/CurrentSend.cs @@ -35,18 +35,19 @@ public async Task SendTest() private async Task Send(ArrayPool pool, ConnectionOptions options, int iteration) { - var channel = new TransparentPipeConnection(new CommandLinePipelineFilter(), options); - channel.Start(); + var connection = new TransparentPipeConnection(options); + + _ = connection.RunAsync(new CommandLinePipelineFilter()); for (var i = 0; i < iteration; i++) { var text = Guid.NewGuid().ToString() + "\r\n"; var buffer = pool.Rent(Encoding.UTF8.GetMaxByteCount(text.Length)); - await channel.SendAsync(new ReadOnlyMemory(buffer)); + await connection.SendAsync(new ReadOnlyMemory(buffer)); pool.Return(buffer); } - await channel.CloseAsync(CloseReason.ServerShutdown); + await connection.CloseAsync(CloseReason.ServerShutdown); } } }