bigcommerce/net-http — pull request #3 by chrisboulton (2014-01-20 02:52:20+00:00)
Title: Explicitly close cURL connections at the end of each request

We had an incident over the weekend due to a long running process which utilized this library for HTTP requests to our DNS service. Due to how the library closes cURL connections (`__destruct`) and how PHP GC works (it doesn't), we ended up with a lot of open file descriptors which caused the long running process to hit the limit on the number of open files. Bad things happened.

This change explicitly closes the cURL connection after each request, and initializes a new one for subsequent requests.

The following test seems to be failing at the moment but I think is unrelated to these changes:

```
1) OptionsTest::testCanSetGlobalTimeoutOption
Failed asserting that 'Failed connect to conformity.sourceforge.net:1; Connection refused' contains "timed out".

/Users/chris.boulton/Bigcommerce/net-http/test/OptionsTest.php:22
/Users/chris.boulton/Bigcommerce/net-http/vendor/phpunit/phpunit/composer/bin/phpunit:42
```

I'm after some feedback on if this is the right way to go about these changes before a blind merge, and also a sanity check as this is a fairly critical library for many of our applications.