Skip to content

Commit

Permalink
8330572: jdk.internal.net.http.HttpConnection calls an expensive chec…
Browse files Browse the repository at this point in the history
…kOpen() when returning a HTTP/1.1 connection to the pool

Reviewed-by: dfuchs, djelinski
  • Loading branch information
jaikiran committed Apr 19, 2024
1 parent 8990864 commit 9f2a4fa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -409,7 +409,7 @@ void closeOrReturnToCache(HttpHeaders hdrs) {
.map((s) -> !s.equalsIgnoreCase("close"))
.orElse(true);

if (keepAlive && checkOpen()) {
if (keepAlive && isOpen()) {
Log.logTrace("Returning connection to the pool: {0}", this);
pool.returnToPool(this);
} else {
Expand Down

1 comment on commit 9f2a4fa

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.