Don't use net-http-persistent on Windows

This commit is contained in:
Olivier Bellone 2018-11-19 12:10:35 +01:00
parent aa611c268c
commit bea6d5dd12
No known key found for this signature in database
GPG Key ID: 11E77E3AA0C40303

View File

@ -36,9 +36,9 @@ module Stripe
builder.use Faraday::Request::UrlEncoded
builder.use Faraday::Response::RaiseError
# Net::HTTP::Persistent doesn't seem to do well on JRuby, so fall
# back to default there.
if RUBY_PLATFORM == "java"
# Net::HTTP::Persistent doesn't seem to do well on Windows or JRuby,
# so fall back to default there.
if Gem.win_platform? || RUBY_PLATFORM == "java"
builder.adapter :net_http
else
builder.adapter :net_http_persistent