Skip to content

Commit

Permalink
Further testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
DJGosnell committed Aug 24, 2023
1 parent 46897b1 commit c14096a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ internal class NexusServerTests_NexusDuplexPipe : BasePipeTests
[TestCase(Type.Quic)]
public async Task PipeReaderReceivesDataMultipleTimes(Type type)
{
var (_, sNexus, _, cNexus, tcs) = await Setup(type, true);
var (_, sNexus, _, cNexus, tcs) = await Setup(type);
int count = 0;

// Ensure that the ids will properly wrap around.
const int iterations = 1000;
const int iterations = 5000;
sNexus.ServerTaskValueWithDuplexPipeEvent = async (nexus, pipe) =>
{
var result = await pipe.Input.ReadAsync();
Expand Down
2 changes: 2 additions & 0 deletions src/NexNet/Internals/NexusSession.Sending.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ private async ValueTask SendHeaderCore(MessageType type, bool force, Cancellatio
FlushResult result = default;
try
{
// If the cancellation token is canceled after the flush has completed, QUIC throws sometimes.
// https://github.com/dotnet/runtime/issues/82704
result = await _pipeOutput.FlushAsync().ConfigureAwait(false);
}
catch (ObjectDisposedException)
Expand Down

0 comments on commit c14096a

Please sign in to comment.