Skip to content

Commit

Permalink
f*ing ruby default http timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeis committed Dec 4, 2013
1 parent 1b3c4fc commit db9769f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rake-tasks/ci.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ def net_http
request.basic_auth(username, apikey)
request["Content-Type"] = "application/octet-stream"
request.body = body
response = net_http.new(uri.host, uri.port).request(request)
http = net_http.new(uri.host, uri.port)
http.read_timeout = 60 * 5 # 5 min
response = http.request(request)
metadata = JSON.parse(response.body)
local_digest = Digest::MD5.hexdigest(body)
if metadata['md5'] == local_digest
Expand Down

0 comments on commit db9769f

Please sign in to comment.