From e052a78a5322416850b6a00a4cb172a926bfc206 Mon Sep 17 00:00:00 2001 From: ondravondra Date: Tue, 4 Apr 2023 14:51:13 +0200 Subject: [PATCH] use correct capacity when creating DynamicQueue when FixedQueue is full (#6632) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ondřej Vondra Co-authored-by: Aaron Stannard --- src/core/Akka.Streams/Implementation/Buffers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/Akka.Streams/Implementation/Buffers.cs b/src/core/Akka.Streams/Implementation/Buffers.cs index 7b2a57802d6..eb28414df47 100644 --- a/src/core/Akka.Streams/Implementation/Buffers.cs +++ b/src/core/Akka.Streams/Implementation/Buffers.cs @@ -375,7 +375,7 @@ public void Enqueue(T element) { if (_tail - _head == Size) { - var queue = new DynamicQueue(_head); + var queue = new DynamicQueue(Capacity); while (NonEmpty) queue.Enqueue(Dequeue()); queue.Enqueue(element);