From bea6d5dd129b0643ffd58c85805823f14eb138be Mon Sep 17 00:00:00 2001 From: Olivier Bellone Date: Mon, 19 Nov 2018 12:10:35 +0100 Subject: [PATCH] Don't use net-http-persistent on Windows --- lib/stripe/stripe_client.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/stripe/stripe_client.rb b/lib/stripe/stripe_client.rb index 6c7c2d8e..7fec0b1e 100644 --- a/lib/stripe/stripe_client.rb +++ b/lib/stripe/stripe_client.rb @@ -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