radiator 0.3.0rc2 → 0.3.0rc3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a9cc38d3e3df7d3f679c9f8f21b1152f57ed8a1
4
- data.tar.gz: 1ed7f95401707f9efe4c3629d2ff82686bd01993
3
+ metadata.gz: 9d24fe649697e4ed2e2d8d22724d63d2f0c6db4e
4
+ data.tar.gz: e9f9251fa40c8b4215b0435aa02951226e6bc78e
5
5
  SHA512:
6
- metadata.gz: af6f9e18109c75c75dcceef3c95e8ffedbb780ceddf97b8a1bf1eb51a5240603077f27aa8e87c390d4ed178cd81e1e5f69ecd1bbb109cac08eee1d18ecfa3c92
7
- data.tar.gz: 760c898112ac4e509f62b0f4f37b3c286d8613d304d9d6baa9ec496d948bd962c23e7f89c85138729f7153a295e78e2a4b23b9a57d8b568df429c97d4e26610a
6
+ metadata.gz: 29e629b26d31a538d93ef8e6b15ab4db255069ee0e652755c7d6923355036fb24bec559116dabb93ca5745a840f361530f3f3753dc47c294a1ec1d323625dc13
7
+ data.tar.gz: becfad6d9d58f503bce71889f9c63e01a188cd2c8cac3b609c0b727d2c44d2396d61eb85a4ac6d0609a6123c2470cc9563ae412522caaacddfe0f374b54b89ec
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- radiator (0.3.0rc2)
4
+ radiator (0.3.0rc3)
5
5
  bitcoin-ruby (= 0.0.11)
6
6
  ffi (= 1.9.18)
7
7
  hashie (~> 3.5, >= 3.5.5)
data/lib/radiator/api.rb CHANGED
@@ -485,6 +485,7 @@ module Radiator
485
485
  http.idle_timeout = idempotent ? 10 : nil
486
486
  http.max_requests = @max_requests
487
487
  http.retry_change_requests = idempotent
488
+ http.reuse_ssl_sessions = !flappy?
488
489
  end
489
490
  end
490
491
 
@@ -559,9 +560,13 @@ module Radiator
559
560
  warning "Failing over to #{@url} ..."
560
561
  end
561
562
 
563
+ def flappy?
564
+ !!@backoff_at && Time.now - @backoff_at < 300
565
+ end
566
+
562
567
  def backoff
563
568
  shutdown
564
- bump_failover if !!@backoff_at && Time.now - @backoff_at < 300
569
+ bump_failover if flappy?
565
570
  @backoff_at ||= Time.now
566
571
  @backoff_sleep ||= 0.01
567
572
 
@@ -1,3 +1,3 @@
1
1
  module Radiator
2
- VERSION = '0.3.0rc2'
2
+ VERSION = '0.3.0rc3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0rc2
4
+ version: 0.3.0rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Martin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-11 00:00:00.000000000 Z
11
+ date: 2017-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler