diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-02-16 12:55:19 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-02-16 12:57:58 +0000 |
commit | 2c143b962d10ec21dbf2624d428ea71a00fb28b3 (patch) | |
tree | 247b0c97ede8a42acbf418e05ad58e077edeac5d | |
parent | 88e0795b9ca7a6525049052bc4598db8380e7f85 (diff) | |
download | morph-2c143b962d10ec21dbf2624d428ea71a00fb28b3.tar.gz |
distbuild: Add a timeout to HTTP requests
It's better to fail with an error after 10 seconds than to get stuck
forever. This code path is used for telling the shared artifact cache
server to fetch artifacts from a worker, and previously if the HTTP
request didn't get a response for whatever reason, the build would hang
until the end of time.
-rwxr-xr-x | distbuild-helper | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/distbuild-helper b/distbuild-helper index cdc1873e..f7ec2026 100755 --- a/distbuild-helper +++ b/distbuild-helper @@ -167,7 +167,7 @@ class HelperMachine(distbuild.StateMachine): path += '?' + query try: - conn = httplib.HTTPConnection(netloc) + conn = httplib.HTTPConnection(netloc, timeout=10) if headers: conn.request(method, path, body, headers) |