stripe 5.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa015ad0ee6a063db43580f0234ec2738fe5670c82cfa4843ed3bc91d8eb4670
4
- data.tar.gz: f987cba3323dbac56c0121fd0d89d5c282a2b3cab9d46f9284cae99b0093d534
3
+ metadata.gz: 85172888973b3726ad9e22512ff8b2568306b70d1627c5ee3adafb29c9626e07
4
+ data.tar.gz: 89344233f7ba4423b5fbc35b30152dec1b5f798931a5b69710d244ea05146b98
5
5
  SHA512:
6
- metadata.gz: 9b5d25d67c8ade84275d3187988de8660df98d1b2323fa231bc4e1a5ef6dfc9edb2ffcbe71bff404f7a473f4cdde0c5644ec379c625f9a45ea62606792f29871
7
- data.tar.gz: ede395b847a59fba4fc3200f174d212c79fa0781222def2323d27cfdec626f3ff869147c2dfc3639206ce9b4d5ff0a282ec92059d04b8ff6b26d619d81655acd
6
+ metadata.gz: e48a09594870a21082733d2b9a7ef9eb9bc27d757de666bb1fbab25b1aa9143c3ad1c2e610a13199395efd36f8d3b71f1d601dd3e03da1a69911e5be46074c5a
7
+ data.tar.gz: 1d376a59eb9072debb80e3c17b1fb6961d766f780c5d81b2771773018616ce4a8e049933537a9ba5a334df774b9307fbf0105af790bbc2ee7a0089d54441ee98
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.0.1 - 2019-08-20
4
+ * [#836](https://github.com/stripe/stripe-ruby/pull/836) Increase connection keep alive timeout to 30 seconds
5
+
3
6
  ## 5.0.0 - 2019-08-20
4
7
  Major version release. The [migration guide](https://github.com/stripe/stripe-ruby/wiki/Migration-guide-for-v5) contains a detailed list of backwards-incompatible changes with upgrade instructions.
5
8
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 5.0.0
1
+ 5.0.1
@@ -11,10 +11,10 @@ module Stripe
11
11
  # instantiated once per thread.
12
12
  #
13
13
  # Note also that this class doesn't currently clean up after itself because
14
- # it expects to only ever have a few connections. It'd be possible to tank
15
- # memory by constantly changing the value of `Stripe.api_base` or the like. A
16
- # possible improvement might be to detect and prune old connections whenever
17
- # a request is executed.
14
+ # it expects to only ever have a few connections (unless `.clear` is called
15
+ # manually). It'd be possible to tank memory by constantly changing the value
16
+ # of `Stripe.api_base` or the like. A possible improvement might be to detect
17
+ # and prune old connections whenever a request is executed.
18
18
  class ConnectionManager
19
19
  def initialize
20
20
  @active_connections = {}
@@ -40,8 +40,6 @@ module Stripe
40
40
 
41
41
  if connection.nil?
42
42
  connection = create_connection(u)
43
-
44
- # TODO: what happens after TTL?
45
43
  connection.start
46
44
 
47
45
  @active_connections[[u.host, u.port]] = connection
@@ -92,6 +90,15 @@ module Stripe
92
90
  proxy_host, proxy_port,
93
91
  proxy_user, proxy_pass)
94
92
 
93
+ # Time in seconds within which Net::HTTP will try to reuse an already
94
+ # open connection when issuing a new operation. Outside this window, Ruby
95
+ # will transparently close and re-open the connection without trying to
96
+ # reuse it.
97
+ #
98
+ # Ruby's default of 2 seconds is almost certainly too short. Here I've
99
+ # reused Go's default for `DefaultTransport`.
100
+ connection.keep_alive_timeout = 30
101
+
95
102
  connection.open_timeout = Stripe.open_timeout
96
103
  connection.read_timeout = Stripe.read_timeout
97
104
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stripe
4
- VERSION = "5.0.0"
4
+ VERSION = "5.0.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe