Skip to content

Commit 3c952f3

Browse files
committed
Fixed naming
1 parent c51afc4 commit 3c952f3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/DotNext.Tests/Net/Multiplexing/TcpMultiplexerTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ public static async Task WaitForConnectionAsync()
248248
await using var server = new TcpMultiplexedListener(LocalEndPoint, new() { Timeout = DefaultTimeout });
249249
await server.StartAsync();
250250

251-
var task = client.WaitForConnectionAsync().AsTask();
251+
var task = client.EnsureConnectedAsync().AsTask();
252252
False(task.IsCompleted);
253253

254254
await client.StartAsync();
@@ -262,7 +262,7 @@ public static async Task WaitForDisposedConnectionAsync()
262262
Task task;
263263
await using (var client = new TcpMultiplexedClient(LocalEndPoint, new() { Timeout = DefaultTimeout }))
264264
{
265-
task = client.WaitForConnectionAsync().AsTask();
265+
task = client.EnsureConnectedAsync().AsTask();
266266
}
267267

268268
await ThrowsAsync<ObjectDisposedException>(Func.Constant(task));

src/cluster/DotNext.Net.Cluster/Net/Multiplexing/MultiplexedClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ protected MultiplexedClient(Options configuration)
4646
output = input.CreateOutput(GC.AllocateArray<byte>(configuration.BufferCapacity, pinned: true), configuration.Timeout);
4747
}
4848

49-
private Task WaitForConnectionCoreAsync(CancellationToken token)
49+
private Task EnsureConnectedCoreAsync(CancellationToken token)
5050
=> readiness?.Task.WaitAsync(token) ?? Task.CompletedTask;
5151

5252
/// <summary>
@@ -57,7 +57,7 @@ private Task WaitForConnectionCoreAsync(CancellationToken token)
5757
/// <exception cref="ObjectDisposedException">The client is disposed.</exception>
5858
public ValueTask StartAsync(CancellationToken token = default)
5959
{
60-
var task = WaitForConnectionCoreAsync(token);
60+
var task = EnsureConnectedCoreAsync(token);
6161
if (ReferenceEquals(dispatcher, Task.CompletedTask))
6262
{
6363
dispatcher = DispatchAsync();
@@ -75,8 +75,8 @@ public ValueTask StartAsync(CancellationToken token = default)
7575
/// </remarks>
7676
/// <param name="token">The token that can be used to cancel the operation.</param>
7777
/// <returns>The task representing connection state.</returns>
78-
public ValueTask WaitForConnectionAsync(CancellationToken token = default)
79-
=> new(WaitForConnectionCoreAsync(token));
78+
public ValueTask EnsureConnectedAsync(CancellationToken token = default)
79+
=> new(EnsureConnectedCoreAsync(token));
8080

8181
/// <summary>
8282
/// Creates a new multiplexed client stream.

0 commit comments

Comments
 (0)