logjam_agent 0.29.3 → 0.29.4

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: 703073cd44c10692585ad5e2ab5a5a3245bae8065cba2ae5499ba5d5037e4338
4
- data.tar.gz: 5b1eb7a29d1c78149a712103a7dc584ec8d56945433280a9602fb443a0766098
3
+ metadata.gz: 16e759be95192971a9b3de66e727bd1a85f8067a05db0aeb991582d05334a2f5
4
+ data.tar.gz: e184b7cc2a440b0c75905367d9a47aba41027f1934f60807d40b4df875c56ab0
5
5
  SHA512:
6
- metadata.gz: 259e809058dfd6517d76d1f4b0e922168d44b4d5131b446ef59aa350cdbdde9fcc33b9792b53b312cba792032e6e5794f0ffa5a4a9d3be829ffc82167ffe0851
7
- data.tar.gz: bfad2b482183a0b75a6ef9892ee1b2eb0df285d4f1d826db78ffc97041be38612fcd2d02752edc07f8ed078181e26c8e2e3ae648a3a4c1ba57f46c55fb2b1125
6
+ metadata.gz: c6264c73cad13fd35cd27e72e152b5e3fc672e45ed80ad0a3e985980547cf1dec0e125b907791cf642bfa9f69abd144ac304c584aadd6adb8195d3908943d455
7
+ data.tar.gz: 7176210c8972b9ebb513b48a7966ef5a2f1382af08198e16bfffa2df645657cc6517fe73583d3d11429ae43d8afc93772cc83502874213dea267fcaa047feadb
@@ -1,3 +1,3 @@
1
1
  module LogjamAgent
2
- VERSION = "0.29.3"
2
+ VERSION = "0.29.4"
3
3
  end
@@ -14,6 +14,8 @@ module LogjamAgent
14
14
  @config = default_options.merge!(opts)
15
15
  @config[:host] = "localhost" if @config[:host].blank?
16
16
  @sequence = SEQUENCE_START
17
+ @socket = nil
18
+ at_exit { ping; reset }
17
19
  end
18
20
 
19
21
  def connection_specs
@@ -51,7 +53,6 @@ module LogjamAgent
51
53
  def socket
52
54
  return @socket if @socket
53
55
  @socket = self.class.context.socket(ZMQ::DEALER)
54
- at_exit { ping; reset }
55
56
  @socket.setsockopt(ZMQ::LINGER, @config[:linger])
56
57
  @socket.setsockopt(ZMQ::SNDHWM, @config[:snd_hwm])
57
58
  @socket.setsockopt(ZMQ::RCVHWM, @config[:rcv_hwm])
@@ -124,7 +125,7 @@ module LogjamAgent
124
125
  end
125
126
 
126
127
  def ping
127
- unless send_receive("ping", "", "{}", NO_COMPRESSION)
128
+ if @socket && !send_receive("ping", "", "{}", NO_COMPRESSION)
128
129
  log_warning "failed to receive pong"
129
130
  end
130
131
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logjam_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.29.3
4
+ version: 0.29.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Kaes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-16 00:00:00.000000000 Z
11
+ date: 2019-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake