diff --git a/src/DotNetty.Codecs.Http2/DefaultHttp2RemoteFlowController.cs b/src/DotNetty.Codecs.Http2/DefaultHttp2RemoteFlowController.cs index 139b02d59..12aa8ecc7 100644 --- a/src/DotNetty.Codecs.Http2/DefaultHttp2RemoteFlowController.cs +++ b/src/DotNetty.Codecs.Http2/DefaultHttp2RemoteFlowController.cs @@ -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; } } diff --git a/test/DotNetty.Buffers.Tests.Netstandard/run.net5.cmd b/test/DotNetty.Buffers.Tests.Netstandard/run.net5.cmd new file mode 100644 index 000000000..c4f8ec361 --- /dev/null +++ b/test/DotNetty.Buffers.Tests.Netstandard/run.net5.cmd @@ -0,0 +1 @@ +dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Buffers.Tests.Netstandard/run.netcore31.cmd b/test/DotNetty.Buffers.Tests.Netstandard/run.netcore31.cmd deleted file mode 100644 index dd3df93ee..000000000 --- a/test/DotNetty.Buffers.Tests.Netstandard/run.netcore31.cmd +++ /dev/null @@ -1 +0,0 @@ -dotnet test --framework netcoreapp3.1 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Codecs.Http.Tests.Netstandard/run.net5.cmd b/test/DotNetty.Codecs.Http.Tests.Netstandard/run.net5.cmd new file mode 100644 index 000000000..c4f8ec361 --- /dev/null +++ b/test/DotNetty.Codecs.Http.Tests.Netstandard/run.net5.cmd @@ -0,0 +1 @@ +dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Codecs.Http.Tests.Netstandard/run.netcore31.cmd b/test/DotNetty.Codecs.Http.Tests.Netstandard/run.netcore31.cmd deleted file mode 100644 index dd3df93ee..000000000 --- a/test/DotNetty.Codecs.Http.Tests.Netstandard/run.netcore31.cmd +++ /dev/null @@ -1 +0,0 @@ -dotnet test --framework netcoreapp3.1 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Codecs.Http2.Tests.Netstandard/run.net5.cmd b/test/DotNetty.Codecs.Http2.Tests.Netstandard/run.net5.cmd new file mode 100644 index 000000000..c4f8ec361 --- /dev/null +++ b/test/DotNetty.Codecs.Http2.Tests.Netstandard/run.net5.cmd @@ -0,0 +1 @@ +dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Codecs.Http2.Tests.Netstandard/run.netcore31.cmd b/test/DotNetty.Codecs.Http2.Tests.Netstandard/run.netcore31.cmd deleted file mode 100644 index dd3df93ee..000000000 --- a/test/DotNetty.Codecs.Http2.Tests.Netstandard/run.netcore31.cmd +++ /dev/null @@ -1 +0,0 @@ -dotnet test --framework netcoreapp3.1 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Codecs.Http2.Tests/StreamBufferingEncoderTest.cs b/test/DotNetty.Codecs.Http2.Tests/StreamBufferingEncoderTest.cs index d3c3a4df8..a9dfe82d5 100644 --- a/test/DotNetty.Codecs.Http2.Tests/StreamBufferingEncoderTest.cs +++ b/test/DotNetty.Codecs.Http2.Tests/StreamBufferingEncoderTest.cs @@ -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++; } diff --git a/test/DotNetty.Codecs.Mqtt.Tests.Netstandard/run.net5.cmd b/test/DotNetty.Codecs.Mqtt.Tests.Netstandard/run.net5.cmd new file mode 100644 index 000000000..c4f8ec361 --- /dev/null +++ b/test/DotNetty.Codecs.Mqtt.Tests.Netstandard/run.net5.cmd @@ -0,0 +1 @@ +dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Codecs.Mqtt.Tests.Netstandard/run.netcore31.cmd b/test/DotNetty.Codecs.Mqtt.Tests.Netstandard/run.netcore31.cmd deleted file mode 100644 index dd3df93ee..000000000 --- a/test/DotNetty.Codecs.Mqtt.Tests.Netstandard/run.netcore31.cmd +++ /dev/null @@ -1 +0,0 @@ -dotnet test --framework netcoreapp3.1 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Codecs.Protobuf.Tests.Netstandard/run.net5.cmd b/test/DotNetty.Codecs.Protobuf.Tests.Netstandard/run.net5.cmd new file mode 100644 index 000000000..c4f8ec361 --- /dev/null +++ b/test/DotNetty.Codecs.Protobuf.Tests.Netstandard/run.net5.cmd @@ -0,0 +1 @@ +dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Codecs.Protobuf.Tests.Netstandard/run.netcore31.cmd b/test/DotNetty.Codecs.Protobuf.Tests.Netstandard/run.netcore31.cmd deleted file mode 100644 index dd3df93ee..000000000 --- a/test/DotNetty.Codecs.Protobuf.Tests.Netstandard/run.netcore31.cmd +++ /dev/null @@ -1 +0,0 @@ -dotnet test --framework netcoreapp3.1 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Codecs.Redis.Tests.Netstandard/run.net5.cmd b/test/DotNetty.Codecs.Redis.Tests.Netstandard/run.net5.cmd new file mode 100644 index 000000000..c4f8ec361 --- /dev/null +++ b/test/DotNetty.Codecs.Redis.Tests.Netstandard/run.net5.cmd @@ -0,0 +1 @@ +dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Codecs.Redis.Tests.Netstandard/run.netcore31.cmd b/test/DotNetty.Codecs.Redis.Tests.Netstandard/run.netcore31.cmd deleted file mode 100644 index dd3df93ee..000000000 --- a/test/DotNetty.Codecs.Redis.Tests.Netstandard/run.netcore31.cmd +++ /dev/null @@ -1 +0,0 @@ -dotnet test --framework netcoreapp3.1 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Codecs.Tests.Netstandard/run.net5.cmd b/test/DotNetty.Codecs.Tests.Netstandard/run.net5.cmd new file mode 100644 index 000000000..c4f8ec361 --- /dev/null +++ b/test/DotNetty.Codecs.Tests.Netstandard/run.net5.cmd @@ -0,0 +1 @@ +dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Codecs.Tests.Netstandard/run.netcore31.cmd b/test/DotNetty.Codecs.Tests.Netstandard/run.netcore31.cmd deleted file mode 100644 index dd3df93ee..000000000 --- a/test/DotNetty.Codecs.Tests.Netstandard/run.netcore31.cmd +++ /dev/null @@ -1 +0,0 @@ -dotnet test --framework netcoreapp3.1 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Common.Tests.Netstandard/run.net5.cmd b/test/DotNetty.Common.Tests.Netstandard/run.net5.cmd new file mode 100644 index 000000000..c4f8ec361 --- /dev/null +++ b/test/DotNetty.Common.Tests.Netstandard/run.net5.cmd @@ -0,0 +1 @@ +dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Common.Tests.Netstandard/run.netcore31.cmd b/test/DotNetty.Common.Tests.Netstandard/run.netcore31.cmd deleted file mode 100644 index dd3df93ee..000000000 --- a/test/DotNetty.Common.Tests.Netstandard/run.netcore31.cmd +++ /dev/null @@ -1 +0,0 @@ -dotnet test --framework netcoreapp3.1 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.End2End.Tests.Netstandard/run.net5.cmd b/test/DotNetty.End2End.Tests.Netstandard/run.net5.cmd new file mode 100644 index 000000000..c4f8ec361 --- /dev/null +++ b/test/DotNetty.End2End.Tests.Netstandard/run.net5.cmd @@ -0,0 +1 @@ +dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.End2End.Tests.Netstandard/run.netcore31.cmd b/test/DotNetty.End2End.Tests.Netstandard/run.netcore31.cmd deleted file mode 100644 index dd3df93ee..000000000 --- a/test/DotNetty.End2End.Tests.Netstandard/run.netcore31.cmd +++ /dev/null @@ -1 +0,0 @@ -dotnet test --framework netcoreapp3.1 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Handlers.Tests.Netstandard/run.net5.cmd b/test/DotNetty.Handlers.Tests.Netstandard/run.net5.cmd new file mode 100644 index 000000000..c4f8ec361 --- /dev/null +++ b/test/DotNetty.Handlers.Tests.Netstandard/run.net5.cmd @@ -0,0 +1 @@ +dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Handlers.Tests.Netstandard/run.netcore31.cmd b/test/DotNetty.Handlers.Tests.Netstandard/run.netcore31.cmd deleted file mode 100644 index dd3df93ee..000000000 --- a/test/DotNetty.Handlers.Tests.Netstandard/run.netcore31.cmd +++ /dev/null @@ -1 +0,0 @@ -dotnet test --framework netcoreapp3.1 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Suite.Tests.Netstandard/run.net5.cmd b/test/DotNetty.Suite.Tests.Netstandard/run.net5.cmd new file mode 100644 index 000000000..c4f8ec361 --- /dev/null +++ b/test/DotNetty.Suite.Tests.Netstandard/run.net5.cmd @@ -0,0 +1 @@ +dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Suite.Tests.Netstandard/run.netcore31.cmd b/test/DotNetty.Suite.Tests.Netstandard/run.netcore31.cmd deleted file mode 100644 index dd3df93ee..000000000 --- a/test/DotNetty.Suite.Tests.Netstandard/run.netcore31.cmd +++ /dev/null @@ -1 +0,0 @@ -dotnet test --framework netcoreapp3.1 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Transport.Libuv.Tests.Netstandard/run.net5.cmd b/test/DotNetty.Transport.Libuv.Tests.Netstandard/run.net5.cmd new file mode 100644 index 000000000..c4f8ec361 --- /dev/null +++ b/test/DotNetty.Transport.Libuv.Tests.Netstandard/run.net5.cmd @@ -0,0 +1 @@ +dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Transport.Libuv.Tests.Netstandard/run.netcore31.cmd b/test/DotNetty.Transport.Libuv.Tests.Netstandard/run.netcore31.cmd deleted file mode 100644 index dd3df93ee..000000000 --- a/test/DotNetty.Transport.Libuv.Tests.Netstandard/run.netcore31.cmd +++ /dev/null @@ -1 +0,0 @@ -dotnet test --framework netcoreapp3.1 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Transport.Tests.Netstandard/run.net5.cmd b/test/DotNetty.Transport.Tests.Netstandard/run.net5.cmd new file mode 100644 index 000000000..c4f8ec361 --- /dev/null +++ b/test/DotNetty.Transport.Tests.Netstandard/run.net5.cmd @@ -0,0 +1 @@ +dotnet test --framework net5.0 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file diff --git a/test/DotNetty.Transport.Tests.Netstandard/run.netcore31.cmd b/test/DotNetty.Transport.Tests.Netstandard/run.netcore31.cmd deleted file mode 100644 index dd3df93ee..000000000 --- a/test/DotNetty.Transport.Tests.Netstandard/run.netcore31.cmd +++ /dev/null @@ -1 +0,0 @@ -dotnet test --framework netcoreapp3.1 -- RunConfiguration.TargetPlatform=x64 \ No newline at end of file