Remove invalid connections from pool

このコミットが含まれているのは:
Omar Roth 2019-10-25 22:40:20 -04:00
コミット 7f8746fcd4
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: B8254FB7EC3D37F2
1個のファイルの変更11行の追加3行の削除

ファイルの表示

@ -1607,9 +1607,17 @@ struct HTTPPool
end
end
response = yield conn
conn.unset_proxy
response
begin
response = yield conn
conn.unset_proxy
response
rescue ex
conn = HTTPClient.new(url)
conn.family = (url.host == "www.youtube.com") ? CONFIG.force_resolve : Socket::Family::UNSPEC
conn.read_timeout = 5.seconds
conn.connect_timeout = 5.seconds
yield conn
end
end
end