Skip to content

Commit 9e38ff1

Browse files
committed
Addressing comments
1 parent 6c34260 commit 9e38ff1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

http-clients/netty-nio-client/src/main/java/software/amazon/awssdk/http/nio/netty/internal/ReleaseOnceChannelPool.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ public Future<Void> release(Channel channel, Promise<Void> promise) {
8080
}
8181

8282
private boolean shouldRelease(Channel channel) {
83+
// IS_RELEASED may be null if this channel was not acquired by this pool. This can happen
84+
// for HTTP/2 when we release the parent socket channel
8385
return channel.attr(IS_RELEASED).get() == null
8486
|| channel.attr(IS_RELEASED).get().compareAndSet(false, true);
8587
}

http-clients/netty-nio-client/src/main/java/software/amazon/awssdk/http/nio/netty/internal/ResponseHandler.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,6 @@ private void onCancel() {
215215
} finally {
216216
runAndLogError("Could not release channel back to the pool",
217217
() -> closeAndRelease(channelContext));
218-
runAndLogError("Could not release channel back to the pool",
219-
() -> closeAndRelease(channelContext));
220218
}
221219
}
222220

0 commit comments

Comments
 (0)