libhoney 1.10.0 → 1.10.1

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
  SHA256:
3
- metadata.gz: ca640b83438614aa15108f5fc6be924f3f0d8833622b2a15f69d02c1954d14e1
4
- data.tar.gz: 116f9f202ca4d9e193f9593d7c0edafd644ee453c28574f69e1dc990d345ea74
3
+ metadata.gz: 701a19cd4bde8de2dfa4a6f3ab46e9a2b6aa08df13e1cecb7b7b0fccb0fe7d4a
4
+ data.tar.gz: 8179e03fb6b2711abda9dfb26ffffe6d3e8c5fae600fe917301a02cc5fe6fb39
5
5
  SHA512:
6
- metadata.gz: 15bb65cda600440ea8a2fe3e420a17b4904cd05be9913feca699d34e06ddcd98d067b5c8e77b7041aa2ddbda6993228ce583406cf5d2c234f4465a425b276757
7
- data.tar.gz: ca4e8aeca95cfa66121b49e6e4859b3635d84e3d550ec4c405319a37bd666e4404614e98de0a1f092d90ddfad39c7daf5c8732fe5df400c50e1dda17b84fe4e0
6
+ metadata.gz: 0175476abe1c2bfc530964fd3f5750fadbfc97df3661214975dc5ac2cfe033eace5c575a81c59cb5b977f3ed51cd4f802bba43e468c2fa297700904f5f0226ef
7
+ data.tar.gz: eea06aab450dc777b1598c23ecda377fbd888423419406568fb66a7b005609028b3f58582d887eb23f1e871b659e1eb8afd6d6355b1c1d82fcf85ef5a2f3d135
@@ -39,12 +39,7 @@ module Libhoney
39
39
  # happens if the queue was full and block_on_send = false.
40
40
  end
41
41
 
42
- @lock.synchronize {
43
- return if @threads.length > 0
44
- while @threads.length < @max_concurrent_batches
45
- @threads << Thread.new { self.send_loop }
46
- end
47
- }
42
+ ensure_threads_running
48
43
  end
49
44
 
50
45
  def send_loop
@@ -124,5 +119,14 @@ module Libhoney
124
119
  ua << " #{user_agent_addition}" if user_agent_addition
125
120
  ua
126
121
  end
122
+
123
+ def ensure_threads_running
124
+ @lock.synchronize {
125
+ @threads.select!(&:alive?)
126
+ while @threads.length < @max_concurrent_batches
127
+ @threads << Thread.new { self.send_loop }
128
+ end
129
+ }
130
+ end
127
131
  end
128
132
  end
@@ -1,3 +1,3 @@
1
1
  module Libhoney
2
- VERSION = "1.10.0"
2
+ VERSION = "1.10.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libhoney
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - The Honeycomb.io Team