hubstep 2.1.1 → 2.1.2

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: f148ad6c3e1db0afc16d65b5dbfca8c4b6ba0e18
4
- data.tar.gz: 196a420ef18d868e92b01f5ebebd0886a0247d7d
3
+ metadata.gz: 84256d93f0060bb666824eece04c2c6b4244f62e
4
+ data.tar.gz: f766e8489277b2c52f7f0eb4df658ac1a1e0cbce
5
5
  SHA512:
6
- metadata.gz: d04043811fec301102ab3517706d7a1b259a5347066a82feae02c6c873887622df7e91fd89397b5eb4cc0829437713f3d29fcfee433aba5ba1ea018bc125099c
7
- data.tar.gz: f9f5e821422466dc65cfaff9439e5fcb10c6837b2409db0068bf81f0eb2ff35baeab36c7e2f91fcae92926611d3e79aa1cf60b3d68eb5608696eb8744e6beeed
6
+ metadata.gz: ed2df4cf9913b6fb3657938135f6a315f7934dca95a4aab095c873d787074ee52e169e55fe553105b8846228a2268692fee434ca327a37223a190411c348ecbf
7
+ data.tar.gz: d24c795ba27266c2a3012ce428d7615becd772e1d0ee7ef159d13f051332f0f18cbc0d2cd1a0c55c265d33f0cbcf4441d45ccccf821bfb79603bba8192aa7c47
@@ -50,8 +50,9 @@ module HubStep
50
50
  # for example)
51
51
  @mutex = Mutex.new
52
52
 
53
- @https = Net::HTTP.new(host, port)
54
- @https.use_ssl = encryption == ENCRYPTION_TLS
53
+ @http = Net::HTTP.new(host, port)
54
+ @http.use_ssl = encryption == ENCRYPTION_TLS
55
+ @http.keep_alive_timeout = 5
55
56
  end
56
57
 
57
58
  def report(report)
@@ -60,8 +61,13 @@ module HubStep
60
61
  req = request report
61
62
 
62
63
  @mutex.synchronize do
64
+ # Typically, keep-alive for Net:HTTP is handled inside a start block,
65
+ # but that's awkward with our threading model. By starting it manually,
66
+ # once, the TCP connection should remain open for multiple report calls.
67
+ @http.start unless @http.started?
68
+
63
69
  begin
64
- res = @https.request(req)
70
+ res = @http.request(req)
65
71
  rescue => e
66
72
  res = e
67
73
  ensure
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HubStep
4
- VERSION = "2.1.1"
4
+ VERSION = "2.1.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubstep
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-27 00:00:00.000000000 Z
11
+ date: 2017-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lightstep