From af2a62ea5ae2681cc14d1cb04e70e8463f5dc409 Mon Sep 17 00:00:00 2001 From: Violeta Georgieva Date: Wed, 8 Jan 2025 09:28:14 +0200 Subject: [PATCH] Http2Pool: Do not proceed with the resource delivery if Borrower is cancelled Signed-off-by: Violeta Georgieva --- .../src/main/java/reactor/netty/http/client/Http2Pool.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactor-netty-http/src/main/java/reactor/netty/http/client/Http2Pool.java b/reactor-netty-http/src/main/java/reactor/netty/http/client/Http2Pool.java index f262a3b5a4..16acecbb76 100644 --- a/reactor-netty-http/src/main/java/reactor/netty/http/client/Http2Pool.java +++ b/reactor-netty-http/src/main/java/reactor/netty/http/client/Http2Pool.java @@ -375,7 +375,7 @@ void drainLoop() { Slot slot = belowMinConnections ? null : findConnection(resources); if (slot != null) { Borrower borrower = pollPending(borrowers, true); - if (borrower == null) { + if (borrower == null || borrower.get()) { offerSlot(resources, slot); continue; } @@ -420,7 +420,7 @@ void drainLoop() { poolConfig.allocationStrategy().returnPermits(permits - 1); } Borrower borrower = pollPending(borrowers, true); - if (borrower == null) { + if (borrower == null || borrower.get()) { continue; } if (isDisposed()) {