Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Proto.Remote/Endpoints/EndpointReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ ServerCallContext context

var cancellationTokenSource = new CancellationTokenSource();

async void Disconnect()
async Task DisconnectAsync()
{
try
{
Expand All @@ -65,13 +65,13 @@ async void Disconnect()
finally
{
// When we disconnect, cancel the token, so the reader and writer both stop, and this method returns,
// so that the stream actually closes. Without this, when kestrel begins shutdown, it's possible the
// so that the stream actually closes. Without this, when kestrel begins shutdown, it's possible the
// connection will stay open until the kestrel shutdown timeout is reached.
cancellationTokenSource.Cancel();
}
}

await using (_endpointManager.CancellationToken.Register(Disconnect).ConfigureAwait(false))
await using (_endpointManager.CancellationToken.Register(() => DisconnectAsync()).ConfigureAwait(false))
{
IEndpoint endpoint;
string? address = null;
Expand Down
Loading