File tree Expand file tree Collapse file tree
src/main/java/software/amazon/awssdk/crt/http Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,10 +162,6 @@ public CompletableFuture<HttpClientConnection> acquireConnection() {
162162 }
163163
164164 CompletableFuture <HttpClientConnection > returnedFuture = new CompletableFuture <>();
165- /* Futures need to add a ref so the HttpClientConnectionManager doesn't clean up from underneath the Future. */
166- this .addRef ();
167- /* This insures that whether a CompletableFuture completes or throws an exception, we remove the ref it added. */
168- returnedFuture .whenComplete ((conn , ex ) -> decRef ());
169165 httpClientConnectionManagerAcquireConnection (this .getNativeHandle (), returnedFuture );
170166 return returnedFuture ;
171167 }
@@ -193,7 +189,7 @@ private void onShutdownComplete() {
193189 * Resources that wait are responsible for calling releaseReferences() manually.
194190 */
195191 @ Override
196- protected boolean canReleaseReferencesImmediately () { return false ; }
192+ protected boolean canReleaseReferencesImmediately () { return true ; }
197193
198194 /**
199195 * Closes this Connection Pool and any pending Connection Acquisitions
You can’t perform that action at this time.
0 commit comments