Page MenuHomePhabricator

httpclient: honor the timeout when setting up the connection

Authored by simpkins on Jul 13 2017, 12:13 AM.


Group Reviewers

Previously HTTPConnection._connect() called socket.create_connection() without
specifying a timeout. This could cause the code to hang forever trying to
establish a connection, even if a timeout parameter was specified when
creating the HTTPConnection object.

Diff Detail

rHG Mercurial
Lint Skipped
Unit Tests Skipped

Event Timeline

simpkins created this revision.Jul 13 2017, 12:13 AM

LGTM, but I'm not sure how to test it locally.

phillco accepted this revision.Jul 13 2017, 2:10 PM
durin42 requested changes to this revision.Jul 14 2017, 11:53 AM
durin42 added a subscriber: durin42.

httpclient is off by default, and is actually vendored code from - Could you sign and send this patch to httpplus (and then we can update the vendored copy).

Alternatively, httpplus is probably a dead end, and we should instead look into switching to requests (so we pick up Cory Benfield's awesome work on that), so we could just rip out httpclient and everything that requires it...

This revision now requires changes to proceed.Jul 14 2017, 11:53 AM
simpkins abandoned this revision.Aug 23 2017, 5:38 PM