Skip to content

Commit

Permalink
Obtain Http2FrameCodec context only when needed (#3032)
Browse files Browse the repository at this point in the history
  • Loading branch information
violetagg authored Jan 18, 2024
1 parent 14095e7 commit 405d190
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -343,10 +343,10 @@ public void onUncaughtException(Connection connection, Throwable error) {

@Override
public void operationComplete(Future<Http2StreamChannel> 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 ||
Expand Down

0 comments on commit 405d190

Please sign in to comment.