No description
Find a file
Jeremy Barlow f859bd907a (TK-101) Move closing of http clients to a separate thread
This commit moves each close call made on a `CloseableHttpAsyncClient`
from the thread on which the request callback is made over to a
different thread in order to avoid a deadlock.

Previously, the client close call was made in the context of thread from
which the callback was invoked.  The Apache HTTP async client library
makes these calls from one of its i/o reactor threads.  In the case of a
"failed" request, e.g., failure to make the client connection, this call
occurs in the context of the primary i/o reactor thread.  The client
close call does an indefinite join on the primary i/o reactor thread
and, therefore, this call causes a deadlock.  The client never closes
and all resources associated with it - threads, file descriptors, etc. -
remain open until the process is shutdown.

This commit introduces a new class, `AsyncClose`, which manages a small,
fixed size thread pool from which client close calls can be executed.
The `async` Clojure and `JavaClient` APIs were updated to use `AsyncClose`
whenever a client needs to be closed from a callback.
2014-10-20 14:22:56 -07:00
dev-resources/ssl Add missing pem file 2014-04-14 15:48:59 -07:00
ext/travisci Add travis config 2014-03-27 12:49:54 -07:00
jenkins Fix variable name in deploy script 2014-03-12 13:52:29 -07:00
src (TK-101) Move closing of http clients to a separate thread 2014-10-20 14:22:56 -07:00
test (TK-101) Move closing of http clients to a separate thread 2014-10-20 14:22:56 -07:00
.gitignore Add travis config 2014-03-27 12:49:54 -07:00
.travis.yml Remove jdk6 from travis test matrix 2014-04-28 11:17:07 -07:00
CHANGELOG.md Updated changelog for 0.2.8 release 2014-10-01 14:16:32 -07:00
CONTRIBUTING.md Add CONTRIBUTING.md 2014-04-15 17:04:52 -07:00
LICENSE Add license and readme. 2014-03-11 17:38:13 -07:00
project.clj lein-release plugin: bumped version from 0.2.8 to 0.2.9-SNAPSHOT for next development cycle 2014-10-01 14:33:27 -07:00
README.md (doc) Update README to link to Apache HttpAsyncClient 2014-07-28 14:45:45 -07:00

Build Status

puppetlabs/http-client

This is a wrapper around the Apache HttpAsyncClient library providing some extra functionality for configuring SSL in a way compatible with Puppet.

Async versions of the http methods are exposed in puppetlabs.http.client.async, and synchronous versions are in puppetlabs.http.client.sync.