carterkozak commented on a change in pull request #296:
URL:
https://github.com/apache/httpcomponents-client/pull/296#discussion_r600907813
##########
File path:
httpclient5/src/main/java/org/apache/hc/client5/http/impl/io/PoolingHttpClientConnectionManager.java
##########
@@ -113,10 +116,12 @@
private final HttpClientConnectionOperator connectionOperator;
private final ManagedConnPool<HttpRoute, ManagedHttpClientConnection> pool;
private final HttpConnectionFactory<ManagedHttpClientConnection>
connFactory;
+ private final ConcurrentMap<HttpRoute, SocketConfig> socketConfigMap;
+ private final ConcurrentMap<HttpRoute, ConnectionMgmtConfig>
connectionMgmtConfigMap;
Review comment:
Should we worry about routes building up over time without a path to
removal and garbage collection?
I wonder if we should provide an interface to optionally build a
route-specific socket and ConnMgmtConfig the first time a route is used, which
can be forgotten and recalculated later if all connections to that route are
cleared (or even naively recalculated for each connection, allowing
implementations to cache internally).
```java
interface RouteBasedSocketConfigProvider {
SocketConfig socketConfigForRoute(HttpRoute route);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]