Skip to content

Commit

Permalink
[HTTP/3] Add null check in case we can't get H/3 inboundControlStream (
Browse files Browse the repository at this point in the history
…#104797)

* Add null check for inboundControlStream on Closing Path

* Enable disabled H/3 test
  • Loading branch information
liveans committed Jul 13, 2024
1 parent 46338d5 commit ac0eeb0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,11 @@ public async Task WaitForClientDisconnectAsync(bool refuseNewRequests = true)

// The client's control stream should throw QuicConnectionAbortedException, indicating that it was
// aborted because the connection was closed (and was not explicitly closed or aborted prior to the connection being closed)
QuicException ex = await Assert.ThrowsAsync<QuicException>(async () => await _inboundControlStream.ReadFrameAsync().ConfigureAwait(false));
Assert.Equal(QuicError.ConnectionAborted, ex.QuicError);
if (_inboundControlStream is not null)
{
QuicException ex = await Assert.ThrowsAsync<QuicException>(async () => await _inboundControlStream.ReadFrameAsync().ConfigureAwait(false));
Assert.Equal(QuicError.ConnectionAborted, ex.QuicError);
}

await CloseAsync(H3_NO_ERROR).ConfigureAwait(false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,12 +237,6 @@ await RemoteExecutor.Invoke(async (useVersion, testAsync) =>
[ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))]
public async Task SendAsync_ExpectedDiagnosticCancelledLogging()
{
if (UseVersion == HttpVersion30)
{
// [ActiveIssue("https://github.com/dotnet/runtime/issues/104699")]
throw new SkipTestException("SendAsync_ExpectedDiagnosticCancelledLogging is broken on HTTP/3.");
}

await RemoteExecutor.Invoke(async (useVersion, testAsync) =>
{
TaskCompletionSource responseLoggedTcs = new(TaskCreationOptions.RunContinuationsAsynchronously);
Expand Down

0 comments on commit ac0eeb0

Please sign in to comment.