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); } } }