shazow/urllib3 — pull request #344 by gullpong (2014-02-26 01:23:39+00:00)
Title: ConnectionPool::urlopen(): Closing opened connections in case of error

If there's an error occur during operation, urlopen() function doesn't
close connection properly.

In my current project, I'm using the timeout and retry feature
frequently, so a single request can be timed-out and retried as many as
20 times.
The number of requests can go up to more than 100,000, and it leads to
crash in open SSL (libcrypto.so.1.0.0.0 segment fault or double free
memory, etc.), assumingly due to the excessive number of sockets
remaining open.

After applying the modification to package code, I could get rid of such
crashes, and my project code runs stable now.