sensu-transport 8.1.0 → 8.2.0

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: b75aa1f55c161361c685e44c5ca7672e921c0894
4
- data.tar.gz: fe76b30902129c7b3c0af15eedc09c8629db138c
3
+ metadata.gz: d2f22c57aedbf4c32ff4b45bc5b35fe6a869a372
4
+ data.tar.gz: 1bb7185cb007cf9333786e824c12d94a192beb72
5
5
  SHA512:
6
- metadata.gz: 86fef9f71bc8eeb8f08fd5ab651621021d4d8e06893dc1876dc743cd91fc5b70529cfefe75514008bb40c0ccc8867c5721326ae447e355145efceb56b9bf1e1b
7
- data.tar.gz: 24ef7945805c03737ef76ccd3850c77dfdf5b751b7841f81a8cc6762ffc98b0068487c2514999123544e1e96eba74474396c247a967f0521dad8ed729f3d5d4b
6
+ metadata.gz: f5b12e1e364bee7c4c7b7d0d0d881d4c985fa3e92e0dcdc5e35b5bc711e94c6a3c66b5e0ec8b879a9d9a71a9c7601537a7c3985602033fd9feb331d03a42b338
7
+ data.tar.gz: 60a10e8de24ea2bf4d7a775ba4bd119d03a3ed27f66787f6a39723b68f77796ad7afa79e6e9888599496fd60574ba0ef2b49ad01eb01625adb1262f5b3d97bf8
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -211,12 +211,8 @@ module Sensu
211
211
  end
212
212
  end
213
213
 
214
- def channels_ready?(&callback)
215
- ready = [@primary_channel, @secondary_channel].all? do |channel|
216
- channel && channel.status == :opened
217
- end
218
- if ready
219
- @logger.debug("transport connection ready")
214
+ def connection_ready(&callback)
215
+ if connected?
220
216
  @connection_timeout.cancel
221
217
  succeed
222
218
  callback.call if callback
@@ -241,6 +237,7 @@ module Sensu
241
237
  connection.logger = @logger
242
238
  connection.on_open do
243
239
  @logger.debug("transport connection open")
240
+ connection_ready(&callback)
244
241
  end
245
242
  connection.on_tcp_connection_loss do
246
243
  @logger.warn("transport connection error", :reason => "tcp connection lost")
@@ -271,9 +268,6 @@ module Sensu
271
268
  prefetch = options.fetch(:prefetch, 1)
272
269
  end
273
270
  channel.prefetch(prefetch)
274
- channel.once_open do
275
- channels_ready?(&callback)
276
- end
277
271
  channel
278
272
  end
279
273
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "sensu-transport"
5
- spec.version = "8.1.0"
5
+ spec.version = "8.2.0"
6
6
  spec.authors = ["Sean Porter"]
7
7
  spec.email = ["portertech@gmail.com", "engineering@sensu.io"]
8
8
  spec.summary = "The Sensu transport abstraction library"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sensu-transport
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.1.0
4
+ version: 8.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Porter
@@ -30,7 +30,7 @@ cert_chain:
30
30
  jOeGyhtQa9j4FFmsEJDg59f5v/3hECXsa3Xuml3foaFHzX3Ya/YIyd2YFxvkFKIu
31
31
  GVbe7A3YdxzdkH2Es/Ym9twdxXaIDdXzj8sWhw==
32
32
  -----END CERTIFICATE-----
33
- date: 2018-10-12 00:00:00.000000000 Z
33
+ date: 2018-10-22 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: eventmachine
metadata.gz.sig CHANGED
Binary file