File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/java.net.http/share/classes/jdk/internal/net/http Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -228,11 +228,11 @@ void stop() {
228228 connectionPoolLock .unlock ();
229229 }
230230 do {
231- connections .values ().forEach (this ::close );
231+ connections .values ().removeIf (this ::close );
232232 } while (!connections .isEmpty ());
233233 }
234234
235- private void close (Http2Connection h2c ) {
235+ private boolean close (Http2Connection h2c ) {
236236 // close all streams
237237 try { h2c .closeAllStreams (); } catch (Throwable t ) {}
238238 // send GOAWAY
@@ -241,6 +241,8 @@ private void close(Http2Connection h2c) {
241241 try { h2c .shutdown (STOPPED ); } catch (Throwable t ) {}
242242 // double check and close any new streams
243243 try { h2c .closeAllStreams (); } catch (Throwable t ) {}
244+ // Allows for use of removeIf in stop()
245+ return true ;
244246 }
245247
246248 HttpClientImpl client () {
You can’t perform that action at this time.
0 commit comments