提交 c7f66d70 编写于 作者: M Mislav Marohnić

don't reference SocketError before net/http is loaded

Tries to fix #261
上级 a5dd8468
......@@ -173,11 +173,14 @@ module Hub
apply_authentication(req, url)
yield req if block_given?
res = http.start { http.request(req) }
res.extend ResponseMethods
res
rescue SocketError => err
raise Context::FatalError, "error with #{type.to_s.upcase} #{url} (#{err.message})"
begin
res = http.start { http.request(req) }
res.extend ResponseMethods
return res
rescue SocketError => err
raise Context::FatalError, "error with #{type.to_s.upcase} #{url} (#{err.message})"
end
end
def request_uri url
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册