Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
cuteant committed Jul 15, 2021
1 parent 287b9ab commit 7e9d5c6
Show file tree
Hide file tree
Showing 28 changed files with 29 additions and 17 deletions.
18 changes: 15 additions & 3 deletions src/DotNetty.Codecs.Http2/DefaultHttp2RemoteFlowController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -704,17 +704,29 @@ protected internal virtual void InitialWindowSize(int newWindowSize)

int delta = newWindowSize - _controller._initialWindowSize;
_controller._initialWindowSize = newWindowSize;
_ = _controller._connection.ForEachActiveStream(Visit);
_ = _controller._connection.ForEachActiveStream(new Http2StreamVisitor(_controller, delta));

if (delta > 0 && _controller.IsChannelWritable())
{
// The window size increased, send any pending frames for all streams.
WritePendingBytes();
}
}

sealed class Http2StreamVisitor : IHttp2StreamVisitor
{
private readonly DefaultHttp2RemoteFlowController _rfc;
private readonly int _delta;

public Http2StreamVisitor(DefaultHttp2RemoteFlowController rfc, int delta)
{
_rfc = rfc;
_delta = delta;
}

bool Visit(IHttp2Stream stream)
public bool Visit(IHttp2Stream stream)
{
_ = _controller.GetState(stream).IncrementStreamWindow(delta);
_ = _rfc.GetState(stream).IncrementStreamWindow(_delta);
return true;
}
}
Expand Down
1 change: 1 addition & 0 deletions test/DotNetty.Buffers.Tests.Netstandard/run.net5.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64
1 change: 0 additions & 1 deletion test/DotNetty.Buffers.Tests.Netstandard/run.netcore31.cmd

This file was deleted.

1 change: 1 addition & 0 deletions test/DotNetty.Codecs.Http.Tests.Netstandard/run.net5.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64

This file was deleted.

1 change: 1 addition & 0 deletions test/DotNetty.Codecs.Http2.Tests.Netstandard/run.net5.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public void ReceivingGoAwayFailsBufferedStreams()
int failCount = 0;
foreach (Task f in futures)
{
if (f.IsFailure())
if (!f.IsSuccess()) // TODO use IsFailure()
{
failCount++;
}
Expand Down
1 change: 1 addition & 0 deletions test/DotNetty.Codecs.Mqtt.Tests.Netstandard/run.net5.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64

This file was deleted.

1 change: 1 addition & 0 deletions test/DotNetty.Codecs.Redis.Tests.Netstandard/run.net5.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64

This file was deleted.

1 change: 1 addition & 0 deletions test/DotNetty.Codecs.Tests.Netstandard/run.net5.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64
1 change: 0 additions & 1 deletion test/DotNetty.Codecs.Tests.Netstandard/run.netcore31.cmd

This file was deleted.

1 change: 1 addition & 0 deletions test/DotNetty.Common.Tests.Netstandard/run.net5.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64
1 change: 0 additions & 1 deletion test/DotNetty.Common.Tests.Netstandard/run.netcore31.cmd

This file was deleted.

1 change: 1 addition & 0 deletions test/DotNetty.End2End.Tests.Netstandard/run.net5.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64
1 change: 0 additions & 1 deletion test/DotNetty.End2End.Tests.Netstandard/run.netcore31.cmd

This file was deleted.

1 change: 1 addition & 0 deletions test/DotNetty.Handlers.Tests.Netstandard/run.net5.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64
1 change: 0 additions & 1 deletion test/DotNetty.Handlers.Tests.Netstandard/run.netcore31.cmd

This file was deleted.

1 change: 1 addition & 0 deletions test/DotNetty.Suite.Tests.Netstandard/run.net5.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64
1 change: 0 additions & 1 deletion test/DotNetty.Suite.Tests.Netstandard/run.netcore31.cmd

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64

This file was deleted.

1 change: 1 addition & 0 deletions test/DotNetty.Transport.Tests.Netstandard/run.net5.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64

This file was deleted.

0 comments on commit 7e9d5c6

Please sign in to comment.