spotify/docker-client — pull request #90 by rculbertson (2014-11-22 06:22:02+00:00)
Title: ProgressStream and LogReader now read entire input stream

When processing a json stream, Jersey will not release the connection until
the entire input stream is read. This is a problem for our ProgressHandler
classes because if they receive an error from docker, they throw an exception
and stop reading. This causes Jersey to never release the connection, so you
will exhaust the connection pool if you encounter enough errors.

We had been calling close on the input stream, but this doesn't release the
connection because the stream we get from Jersey is of type UnCloseableInputStream,
where close is a no-op. So we now read the entire object instead.