searchbox-io/Jest — pull request #149 by matthewbogner (2014-09-24 23:01:27+00:00)
Title: idle connection reaper

This adds a feature to close idle connections in the connection pool, only if configured. I'd like to add tests for this, but I must admit that even without making any changes, I can't get the tests to pass. If you have any tips on environment settings to get the tests to pass (mvn clean verify), then I'd love to add some tests as well.

The Apache HttpClient requires a separate thread to close idle connections periodically, which is a bit of a bummer. This pull request uses a similar design as the NodeChecker to periodically close any idle connections lying around in the connection pool.

My intent is to make this an opt-in behavior (i.e. no change to existing configurations), and to work for both the HTTP and Droid clients. If I could run the tests, I'd feel more confident that I succeeded.