Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit 1fb8107

Browse files
committed
Remove http client connection sweeper
It's applied by the Jetty code if the destination idle timeout is greater than zero
1 parent 8351a06 commit 1fb8107

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

http-client/src/main/java/com/proofpoint/http/client/jetty/JettyHttpClient.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
import org.eclipse.jetty.util.thread.QueuedThreadPool;
4242
import org.eclipse.jetty.util.thread.ScheduledExecutorScheduler;
4343
import org.eclipse.jetty.util.thread.Scheduler;
44-
import org.eclipse.jetty.util.thread.Sweeper;
4544
import org.weakref.jmx.Flatten;
4645
import org.weakref.jmx.Managed;
4746
import org.weakref.jmx.Nested;
@@ -88,7 +87,6 @@ public class JettyHttpClient
8887
};
8988

9089
private static final String PLATFORM_STATS_KEY = "platform_stats";
91-
private static final long SWEEP_PERIOD_MILLIS = 5000;
9290

9391
private static final AtomicLong NAME_COUNTER = new AtomicLong();
9492
private static final JettyHttpClientOptions DEFAULT_CLIENT_OPTIONS =
@@ -249,12 +247,6 @@ public JettyHttpClient(
249247
httpClient.getScheduler(),
250248
config.getConnectTimeout().toMillis()));
251249

252-
// Jetty client connections can sometimes get stuck while closing which reduces
253-
// the available connections. The Jetty Sweeper periodically scans the active
254-
// connection pool looking for connections in the closed state, and if a connection
255-
// is observed in the closed state multiple times, it logs, and destroys the connection.
256-
httpClient.addBean(new Sweeper(httpClient.getScheduler(), SWEEP_PERIOD_MILLIS), true);
257-
258250
try {
259251
this.httpClient.start();
260252

0 commit comments

Comments
 (0)