statsd-instrument 3.2.0 → 3.2.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: f42d327300430dd5926c971c7d27d860acd99800cc8eeb4552892f755037553f
4
- data.tar.gz: 88c22b7ef591313d0e159a24f3875ddc7a63acf0c6d10551cac6bf069a6c0ad3
3
+ metadata.gz: 6790fe7a0ed5dd8f89e8916d331548dce3a2fcfbf049221a074ee17f87742826
4
+ data.tar.gz: c74dd8549a0210341f624228ee24c7ba61b8a070ef9b476dac452b7ebbe8af27
5
5
  SHA512:
6
- metadata.gz: 8a0d04e0acf3ddb8ae85bb3d5b4a560dbb713c6c8d26654cca6d52b5b3d70a8570b424b489e33d5bcc301f419db8e1de448daaee863fb0624ff52aa10c67c9a4
7
- data.tar.gz: f56d3bd3ecd117d9a359de5445f3b00750d11151a40da26f6e902cd1c5800c8688ae1bab05f2457eb519751c642f69278425ba4541a6fe6caa41dd766dd3a21c
6
+ metadata.gz: 4c0b2d0f48c8acab57dfe9ea5b05ba689e6c5b6ebe634948060b00ec59070767acc6ed548bfde7a76c75ece200b6ba15ecea5b187b90efb3bb2830a47dd5d566
7
+ data.tar.gz: 7f2fe38052d38f2bf90a66837cf380ee2c4e8363222920cf80cd5b4aac1170f1ad737a44cb336dd55116ccf74a6e563d65f4ab88abedf5f24dacb345ccc89bc8
data/CHANGELOG.md CHANGED
@@ -8,6 +8,10 @@ section below.
8
8
 
9
9
  _Nothing yet_
10
10
 
11
+ ## Version 3.2.1
12
+
13
+ - Fix a bug in UDP batching that could cause the Ruby process to be stuck on exit (#291).
14
+
11
15
  ## Version 3.2.0
12
16
 
13
17
  - Add `tag_error_class` option to `statsd_count_success` which tags the class of a thrown error
@@ -64,9 +64,18 @@ module StatsD
64
64
  # If the dispatcher thread is dead, we assume it is because
65
65
  # the process was forked. So to avoid ending datagrams twice
66
66
  # we clear the buffer.
67
- @buffer.clear
68
- @dispatcher_thread = Thread.new { dispatch }
67
+ # However if the main the main thread is dead, we won't be able
68
+ # to spawn a new thread, so we fallback to sending our datagram directly.
69
+ if Thread.main.alive?
70
+ @buffer.clear
71
+ @dispatcher_thread = Thread.new { dispatch }
72
+ else
73
+ @buffer << datagram
74
+ flush
75
+ return self
76
+ end
69
77
  end
78
+
70
79
  @buffer << datagram
71
80
  self
72
81
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module StatsD
4
4
  module Instrument
5
- VERSION = "3.2.0"
5
+ VERSION = "3.2.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statsd-instrument
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesse Storimer
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-06-22 00:00:00.000000000 Z
13
+ date: 2022-07-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: concurrent-ruby