shazow/urllib3 — pull request #268 by kevinburke (2013-10-20 22:08:50+00:00)
Title: Set default timeout on the server socket

This probably isn't the best way to solve this, but in some cases (for me, test_timeout_errors_cause_retries) if the main thread fails with an exception, the server thread will never get an accept() and it will hang indefinitely. Control won't be returned to the caller and you can't kill it with a KeyboardInterrupt.

This sets a default timeout on the socket so control is eventually returned and the tests complete.