Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -300,5 +300,14 @@ public HttpClient createClient(ClientConfig config) {
Objects.requireNonNull(config, "Client config must be set");
return new JdkHttpClient(config);
}

@Override
public void cleanupIdleClients() {
HttpClient.Factory.super.cleanupIdleClients();

// The SelectorManager thread uses internally a WeakReference to the HttpClient to check if it
// is still used or the thread can be stopped. Calling the GC will clear the WeakReference.
System.gc();
}
}
}