geemus/excon — pull request #273 by burns (2013-09-22 16:16:32+00:00)
Title: close socket on error

There are cases where a request can not be idempotent (when a
request_block is used) or using the idempotent middleware is not
desired. This ensures the socket is closed if the error is rescued and
the request is retried.

This also prevents an issue with the test suite, where a test can fail
and subsequent tests will fail because they receive the response body
from the previous test's request, or 'bad write retry' errors occur.