mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-10-04 00:00:47 -04:00
One thing I forgot to look into was how long Ruby will hold a connection open by default. It turns out that the language default is very low at only two seconds. Here we increase it to 30 seconds, which is a more reasonable default. I took this number from Go's `DefaultTransport`, which seems to have been working pretty well so far. I tested with a script that keeps a connection idle to Stripe for a long period of time before issuing a new request and everything seems to be working well.