diff --git a/reactor-netty-http/src/main/java/reactor/netty/http/client/Http2ConnectionProvider.java b/reactor-netty-http/src/main/java/reactor/netty/http/client/Http2ConnectionProvider.java index d565dea021..5a39747c44 100644 --- a/reactor-netty-http/src/main/java/reactor/netty/http/client/Http2ConnectionProvider.java +++ b/reactor-netty-http/src/main/java/reactor/netty/http/client/Http2ConnectionProvider.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020-2022 VMware, Inc. or its affiliates, All Rights Reserved. + * Copyright (c) 2020-2024 VMware, Inc. or its affiliates, All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -343,10 +343,10 @@ public void onUncaughtException(Connection connection, Throwable error) { @Override public void operationComplete(Future future) { - Channel channel = pooledRef.poolable().channel(); - Http2Pool.Http2PooledRef http2PooledRef = http2PooledRef(pooledRef); - ChannelHandlerContext frameCodec = http2PooledRef.slot.http2FrameCodecCtx(); if (future.isSuccess()) { + Channel channel = pooledRef.poolable().channel(); + Http2Pool.Http2PooledRef http2PooledRef = http2PooledRef(pooledRef); + ChannelHandlerContext frameCodec = http2PooledRef.slot.http2FrameCodecCtx(); Http2StreamChannel ch = future.getNow(); if (!channel.isActive() || frameCodec == null ||