Skip to content

Commit 8c94ab6

Browse files
committed
add evict timeout to logx connections (#518)
1 parent 7fc043c commit 8c94ab6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core-httpclient-impl/src/main/java/com/optimizely/ab/event/AsyncEventHandler.java

+2
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ public AsyncEventHandler(int queueCapacity,
119119
.withMaxTotalConnections(maxConnections)
120120
.withMaxPerRoute(connectionsPerRoute)
121121
.withValidateAfterInactivity(validateAfter)
122+
// infrequent event discards observed. staled connections force-closed after a long idle time.
123+
.withEvictIdleConnections(1L, TimeUnit.MINUTES)
122124
.build();
123125

124126
this.workerExecutor = new ThreadPoolExecutor(numWorkers, numWorkers,

0 commit comments

Comments
 (0)