8000 add evict timeout to logx connections (#518) · optimizely/java-sdk@7ca4df3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7ca4df3

Browse files
authored
add evict timeout to logx connections (#518)
1 parent c60c9e6 commit 7ca4df3

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

Lines changed: 2 additions & 0 deletions
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)
0