Fixing build
This commit is contained in:
parent
0c8df245de
commit
633c572a22
|
|
@ -104,6 +104,7 @@ namespace Microsoft.AspNetCore.Sockets.Client
|
|||
{
|
||||
Output.TryComplete();
|
||||
await _transport.StopAsync();
|
||||
await DrainMessages();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
|
@ -112,6 +113,17 @@ namespace Microsoft.AspNetCore.Sockets.Client
|
|||
_transport.Dispose();
|
||||
}
|
||||
|
||||
private async Task DrainMessages()
|
||||
{
|
||||
while (await Input.WaitToReadAsync())
|
||||
{
|
||||
if (Input.TryRead(out Message message))
|
||||
{
|
||||
message.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Task<Connection> ConnectAsync(Uri url, ITransport transport) => ConnectAsync(url, transport, null, null);
|
||||
public static Task<Connection> ConnectAsync(Uri url, ITransport transport, ILoggerFactory loggerFactory) => ConnectAsync(url, transport, null, loggerFactory);
|
||||
public static Task<Connection> ConnectAsync(Uri url, ITransport transport, HttpClient httpClient) => ConnectAsync(url, transport, httpClient, null);
|
||||
|
|
|
|||
Loading…
Reference in New Issue