Question

Do I need to close expired connections in Apache HttpAsyncClient as is done with HttpClient?

Was it helpful?

Solution

I just double-checked the source code. Yes, one still has to explicitly evict expired connections from the pool. However, the underlying NIO channel and socket will get closed and released immediately. The problem with expired connections not being automatically evicted from the pool is a bug in HttpAsyncClient 4.0 beta3. Feel free to raise a JIRA for this defect.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top