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

don't reference SocketError before net/http is loaded

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